-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #648 from hngprojects/layobright-clean
- Loading branch information
Showing
9 changed files
with
143 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
"use client"; | ||
|
||
import { useEffect } from "react"; | ||
|
||
import { Breadcrumb } from "~/components/common/breadcrumb"; | ||
import privacyPolicyData, { | ||
getTableOfContents, | ||
} from "~/components/layouts/Legal/PrivacyPolicy/constants/privacyPolicyData"; | ||
import PrivacyPolicyContent from "~/components/layouts/Legal/PrivacyPolicy/PrivacyPolicyContent"; | ||
import TableOfContent from "~/components/layouts/Legal/TableOfContent"; | ||
import SubPageHero from "~/components/layouts/Legal/Terms&Conditions/SubPageHero"; | ||
|
||
export default function PrivacyPolicy() { | ||
const tableOfContents = getTableOfContents(privacyPolicyData); | ||
|
||
useEffect(() => { | ||
const scrollClasses = [ | ||
"scroll-smooth", | ||
"scroll-pt-24", | ||
"md:scroll-pt-[108px]", | ||
]; | ||
|
||
const htmlElement = document.documentElement; | ||
htmlElement.classList.add(...scrollClasses); | ||
|
||
return () => { | ||
htmlElement.classList.remove(...scrollClasses); | ||
}; | ||
}, []); | ||
|
||
return ( | ||
<main className=""> | ||
<SubPageHero | ||
heading="Privacy Policy" | ||
description="Achieve your dreams with us today" | ||
/> | ||
|
||
<div className="mx-auto max-w-7xl px-5 py-20 md:px-10 lg:px-10 xl:px-10"> | ||
<Breadcrumb variant="primary" /> | ||
|
||
<section className="my-[70px] flex max-w-full flex-col-reverse items-start justify-between pb-10 lg:flex-row"> | ||
<PrivacyPolicyContent | ||
content={privacyPolicyData} | ||
className="text-neutral-dark-1 lg:w-[750px]" | ||
/> | ||
|
||
<TableOfContent | ||
listOfContent={tableOfContents} | ||
className="p-[10px] text-neutral-dark-1 max-lg:mb-14 lg:sticky lg:top-20 lg:w-[350px]" | ||
/> | ||
</section> | ||
</div> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Breadcrumb } from "~/components/common/breadcrumb"; | ||
import Main from "~/components/layouts/Legal/Terms&Conditions/Main"; | ||
import SubPageHero from "~/components/layouts/Legal/Terms&Conditions/SubPageHero"; | ||
|
||
const TermsConditions = () => { | ||
return ( | ||
<div className="" data-testid="terms-conditions"> | ||
<div data-testid="subpage-hero"> | ||
<SubPageHero | ||
heading="Terms and Conditions" | ||
description="Achieve your dreams with us today" | ||
/> | ||
</div> | ||
|
||
<div | ||
className="mx-auto max-w-7xl px-5 py-20 md:px-10 lg:px-10 xl:px-10" | ||
data-testid="breadcrumb-container" | ||
> | ||
<div data-testid="breadcrumb"> | ||
<Breadcrumb | ||
pages={[ | ||
{ name: "Home", href: "/" }, | ||
{ name: "Legal Terms", href: "/" }, | ||
{ | ||
name: "Terms and Conditions", | ||
href: "/terms-and-conditions", | ||
isCurrent: true, | ||
}, | ||
]} | ||
variant="primary" | ||
/> | ||
</div> | ||
|
||
<div data-testid="main-content"> | ||
<Main /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TermsConditions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/components/layouts/Legal/Terms&Conditions/SubPageHero.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
interface SubPageHeroProperty { | ||
heading?: string; | ||
description?: string; | ||
} | ||
|
||
const SubPageHero = ({ | ||
heading = "Build Your Product Faster", | ||
description = "Get Your Free Boilerplate Samples!", | ||
}: SubPageHeroProperty) => { | ||
return ( | ||
<div | ||
data-testid="subpage-hero" | ||
className="relative box-border flex h-[13.438rem] w-full shrink-0 flex-col items-center justify-center overflow-hidden bg-black px-[0rem] py-[4.687rem] text-center text-[2rem] text-white md:h-[20.25rem] md:text-[2.75rem] lg:text-[3.75rem]" | ||
> | ||
<div className="flex flex-col items-center justify-start gap-[0.25rem]"> | ||
<b className="relative">{heading}</b> | ||
<div className="relative self-stretch text-[1.25rem] md:text-[1.75rem]"> | ||
{description} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SubPageHero; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters