Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

refactor : refactoring footer component #531

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 4 additions & 58 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,62 +1,8 @@
import { FaDev, FaDiscord } from "react-icons/fa";
import OpenSaucedLogo from "../assets/openSauced-icon.png";

// icons
import
{
AiOutlineTwitter,
AiOutlineGithub,
AiFillInstagram,
AiFillYoutube,
} from "react-icons/ai";


const footerContext = [
{
privacy: { url: "https://app.termly.io/document/privacy-policy/5e303854-d262-468a-80ec-54b645d01c2e", text: "Privacy" },
terms: { url: "https://app.termly.io/document/terms-of-use-for-saas/03e4e1c1-53ad-4fc4-b415-5c3f0e8c25ef", text: "Terms" },
status: { url: "https://status.opensauced.pizza", text: "Status" },
},
{
hot: { url: "https://hot.opensauced.pizza", text: "hot.opensauced.pizza" },
openSauced: { url: "https://opensauced.pizza", text: "opensauced.pizza" },
},
{
socials: [
{
icon: AiOutlineTwitter,
label: "Twitter",
url: "https://twitter.com/saucedopen",
},
{
icon: AiOutlineGithub,
label: "GitHub",
url: "https://github.com/open-sauced",
},
{
icon: AiFillInstagram,
label: "Instagram",
url: "https://www.instagram.com/opensauced/",
},
{
icon: AiFillYoutube,
label: "YouTube",
url: "https://www.youtube.com/opensauced",
},
{
icon: FaDiscord,
label: "Discord",
url: "https://discord.com/invite/U2peSNf23P",
},
{
icon: FaDev,
label: "Devto",
url: "https://dev.to/opensauced/",
},
],
},
];
import footerContext from "../constants";
import OpenSaucedLogo from '../assets/openSauced-icon.png'

Check failure on line 2 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Strings must use doublequote

Check failure on line 2 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Strings must use doublequote

Check failure on line 2 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Missing semicolon

Check failure on line 2 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Strings must use doublequote

Check failure on line 2 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Strings must use doublequote

Check failure on line 2 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Missing semicolon



Check failure on line 5 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

More than 2 blank lines not allowed

Check failure on line 5 in src/components/Footer.tsx

View workflow job for this annotation

GitHub Actions / Code standards

More than 2 blank lines not allowed
const Footer = (): JSX.Element => (
<div>
<footer className="px-6 md:px-16 w-full bg-light-slate-2 transition">
Expand Down
18 changes: 12 additions & 6 deletions src/components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
const Hero = () => (
<div className="flex flex-col py-24 items-center mx-2.5">
<section

Check failure on line 3 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Trailing spaces not allowed

Check failure on line 3 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Trailing spaces not allowed
className="flex flex-col py-24 items-center mx-2.5">

Check failure on line 4 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Expected no line gap between “section” and “className”

Check failure on line 4 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

The closing bracket must be aligned with the opening tag (expected column 3 on the next line)

Check failure on line 4 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Expected no line gap between “section” and “className”

Check failure on line 4 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

The closing bracket must be aligned with the opening tag (expected column 3 on the next line)
<div>
<h1 className="font-Lexend text-4xl md:text-5xl text-center text-lightSlate leading-tight tracking-tight">
<h1
className="font-Lexend text-4xl md:text-5xl text-center text-lightSlate leading-tight tracking-tight"

Check failure on line 8 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Trailing spaces not allowed

Check failure on line 8 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Trailing spaces not allowed
>
{`Find `}

<span className="bg-gradient-to-r from-gradFirst via-gradMiddle to-gradLast bg-clip-text text-transparent">
<span

Check warning on line 11 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

JSX element should start in a new line

Check warning on line 11 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

JSX element should start in a new line
className="bg-gradient-to-r from-gradFirst via-gradMiddle to-gradLast bg-clip-text text-transparent"
aria-label="Open-Source Repositories"

Check failure on line 13 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Props should be sorted alphabetically

Check failure on line 13 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Props should be sorted alphabetically
>
Open-Source Repositories
</span>

<br />

Check warning on line 17 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

JSX element should start in a new line

Check warning on line 17 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

JSX element should start in a new line
trending today.
</h1>
</div>
</div>
</section>
);

export default Hero;
57 changes: 57 additions & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { AiOutlineTwitter, AiOutlineGithub, AiFillInstagram, AiFillYoutube } from "react-icons/ai";
import { FaDev, FaDiscord } from "react-icons/fa";
import OpenSaucedLogo from "../assets/openSauced-icon.png";

Check failure on line 3 in src/constants/index.ts

View workflow job for this annotation

GitHub Actions / Code standards

'OpenSaucedLogo' is defined but never used

Check failure on line 3 in src/constants/index.ts

View workflow job for this annotation

GitHub Actions / Code standards

'OpenSaucedLogo' is defined but never used


const footerContext = [
{
privacy: {
url: "https://app.termly.io/document/privacy-policy/5e303854-d262-468a-80ec-54b645d01c2e",
text: "Privacy",
},
terms: {
url: "https://app.termly.io/document/terms-of-use-for-saas/03e4e1c1-53ad-4fc4-b415-5c3f0e8c25ef",
text: "Terms",
},
status: { url: "https://status.opensauced.pizza", text: "Status" },
},
{
hot: { url: "https://hot.opensauced.pizza", text: "hot.opensauced.pizza" },
openSauced: { url: "https://opensauced.pizza", text: "opensauced.pizza" },
},
{
socials: [
{
icon: AiOutlineTwitter,
label: "Twitter",
url: "https://twitter.com/saucedopen",
},
{
icon: AiOutlineGithub,
label: "GitHub",
url: "https://github.com/open-sauced",
},
{
icon: AiFillInstagram,
label: "Instagram",
url: "https://www.instagram.com/opensauced/",
},
{
icon: AiFillYoutube,
label: "YouTube",
url: "https://www.youtube.com/opensauced",
},
{
icon: FaDiscord,
label: "Discord",
url: "https://discord.com/invite/U2peSNf23P",
},
{
icon: FaDev,
label: "Devto",
url: "https://dev.to/opensauced/",
},
],
},
];
export default footerContext;
Loading