Skip to content

Commit

Permalink
fix: separated styles in styles.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Srish-ty committed Nov 8, 2023
1 parent d8c84cb commit b5fe63a
Show file tree
Hide file tree
Showing 20 changed files with 330 additions and 295 deletions.
2 changes: 1 addition & 1 deletion config/content/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@fortawesome/free-brands-svg-icons';
import config from '../website';

import { insta, fb, twitter, gh, li } from '../../src/components/Footer/images';
import { insta, fb, twitter, gh, li } from '../../src/components/marginals/Footer/images';

export default {
hacknitr: {
Expand Down
96 changes: 0 additions & 96 deletions src/components/Footer/AboutBox.jsx

This file was deleted.

107 changes: 0 additions & 107 deletions src/components/Footer/Cradle.jsx

This file was deleted.

53 changes: 0 additions & 53 deletions src/components/Footer/styles.jsx

This file was deleted.

39 changes: 39 additions & 0 deletions src/components/marginals/Footer/AboutBox.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import styled from 'styled-components';

Check failure on line 2 in src/components/marginals/Footer/AboutBox.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'styled' is defined but never used
import tw from 'twin.macro';

Check failure on line 3 in src/components/marginals/Footer/AboutBox.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'tw' is defined but never used
import { Heading3 } from '../..';
import {
FirstAboutContainer,
FirstRow,
FrItems,
AboutBox,
Para,
Content,
LogoCont,
LogoImg,
} from './styles';

const AboutContainer = ({ AbtLogo, about_content }) => {

Check failure on line 16 in src/components/marginals/Footer/AboutBox.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

Identifier 'about_content' is not in camel case
console.log(about_content);

Check warning on line 17 in src/components/marginals/Footer/AboutBox.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

Unexpected console statement
return (
<FirstAboutContainer>
<FirstRow>
<FrItems>About US</FrItems>
<FrItems>Contact US</FrItems>
<FrItems>Sponsor US</FrItems>
</FirstRow>

<AboutBox>
<LogoCont>
<LogoImg src={AbtLogo} alt={about_content.img.alt} />
</LogoCont>
<Para>
<Heading3>{about_content.title}</Heading3>
<Content>{about_content.text}</Content>
</Para>
</AboutBox>
</FirstAboutContainer>
);
};

export default AboutContainer;
39 changes: 39 additions & 0 deletions src/components/marginals/Footer/Cradle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import tw from 'twin.macro';

Check failure on line 2 in src/components/marginals/Footer/Cradle.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'tw' is defined but never used
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

Check failure on line 3 in src/components/marginals/Footer/Cradle.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'FontAwesomeIcon' is defined but never used
import { SocialLogo, SocialText, SocialsCont, CradleContainer, Ball, Ball1, Ball5 } from './styles';
import { fb, twitter } from './images';

const Cradle = ({ socials, text }) => {

Check failure on line 7 in src/components/marginals/Footer/Cradle.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`
return (
<SocialsCont>
<CradleContainer>
<a href='https://facebook.com/hacknitr'>
<Ball1>
<SocialLogo src={fb} />
</Ball1>
</a>
{socials.slice(1, -1).map((s) => (
<a href={s.link}>

Check failure on line 17 in src/components/marginals/Footer/Cradle.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

Missing "key" prop for element in iterator
<Ball>
<SocialLogo src={s.name} />
</Ball>
</a>
))}
<a href='https://twitter.com/hacknitr'>
<Ball5>
<SocialLogo src={twitter} />
</Ball5>
</a>
</CradleContainer>

<SocialText>
{text.content1}
<br />
{text.content2}
</SocialText>
</SocialsCont>
);
};

export default Cradle;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Container, Heading2, Heading3 } from '..';
import footer from '../../../config/content/Footer';
import { Container, Heading2, Heading3 } from '../..';

Check failure on line 2 in src/components/marginals/Footer/Footer.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'Container' is defined but never used

Check failure on line 2 in src/components/marginals/Footer/Footer.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'Heading2' is defined but never used

Check failure on line 2 in src/components/marginals/Footer/Footer.jsx

View workflow job for this annotation

GitHub Actions / eslint / Eslint Check

'Heading3' is defined but never used
import footer from '../../../../config/content/Footer';
import { FooterContainer, InitialCont, ImgCont, SecondPendulumContainer } from './styles';
import { NitLogo, FooterImg } from './images';
import TermsNCredits from './TermsNCredits';
Expand All @@ -15,7 +15,7 @@ export const Footer = () => {
<InitialCont>
<AboutContainer AbtLogo={NitLogo} about_content={footer.cards[0]} />
<SecondPendulumContainer>
<Cradle socials={footer.socials} />
<Cradle socials={footer.socials} text={footer.icons} />
</SecondPendulumContainer>
</InitialCont>
<TermsNCredits copyw={footer.copyright} />
Expand Down
Loading

0 comments on commit b5fe63a

Please sign in to comment.