-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Terms and Privacy modals (#97)
* terms and privacy modals * resolve email * Use proper quotes * Proper quotes terms * no warranty bold * rm terms -> privacy link * limitations of liability bold * DISPUTE RESOLUTION; ARBITRATION AGREEMENT bold * How We Use Your Personal Information no bullets * Your Choices paragraph * http allaboutdnt.com * contacting email * Events, promotions and contests - no semicolon * rm out json * patch * alpha capital --------- Co-authored-by: Vitalis Salis <[email protected]>
- Loading branch information
1 parent
40aedf1
commit abf4b54
Showing
15 changed files
with
1,705 additions
and
639 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { useTheme } from "next-themes"; | ||
import Image from "next/image"; | ||
import { useEffect, useState } from "react"; | ||
|
||
import darkIcon from "@/app/assets/icon-black.svg"; | ||
import lightIcon from "@/app/assets/icon-white.svg"; | ||
|
||
interface IconProps {} | ||
|
||
export const Icon: React.FC<IconProps> = () => { | ||
const [mounted, setMounted] = useState(false); | ||
const { resolvedTheme } = useTheme(); | ||
const lightSelected = resolvedTheme === "light"; | ||
|
||
// useEffect only runs on the client, so now we can safely show the UI | ||
useEffect(() => { | ||
setMounted(true); | ||
}, []); | ||
|
||
// uses placeholder of babylon logo with primary color | ||
// since before theme is resolved, we don't know which logo to show | ||
if (!mounted) { | ||
return <span className="h-[24px] w-[24px]" />; | ||
} | ||
|
||
return ( | ||
<span className="inline-block mx-2"> | ||
<Image | ||
src={lightSelected ? darkIcon : lightIcon} | ||
alt="Babylon" | ||
width={24} | ||
height={24} | ||
/> | ||
</span> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { IoMdClose } from "react-icons/io"; | ||
|
||
import { GeneralModal } from "../GeneralModal"; | ||
|
||
import { Privacy } from "./data/privacy"; | ||
|
||
interface PrivacyModalProps { | ||
open: boolean; | ||
onClose: (value: boolean) => void; | ||
} | ||
|
||
export const PrivacyModal: React.FC<PrivacyModalProps> = ({ | ||
open, | ||
onClose, | ||
}) => { | ||
return ( | ||
<GeneralModal open={open} onClose={onClose}> | ||
<div className="mb-4 flex items-center justify-between"> | ||
<h4 className="font-bold">Privacy Policy</h4> | ||
<button | ||
className="btn btn-circle btn-ghost btn-sm" | ||
onClick={() => onClose(false)} | ||
> | ||
<IoMdClose size={24} /> | ||
</button> | ||
</div> | ||
<Privacy /> | ||
</GeneralModal> | ||
); | ||
}; |
Oops, something went wrong.