-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ledger-live-updates' into ledger-live-fix-connection-er…
…rors
- Loading branch information
Showing
90 changed files
with
3,156 additions
and
841 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
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
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,88 @@ | ||
import React from "react" | ||
import { | ||
Box, | ||
useMultiStyleConfig, | ||
List, | ||
ListItem, | ||
LinkProps, | ||
Link, | ||
Button, | ||
Icon, | ||
} from "@chakra-ui/react" | ||
import { EXTERNAL_HREF } from "#/constants" | ||
import { AcreSignIcon, ArrowUpRight } from "#/assets/icons" | ||
|
||
type FooterListItem = Pick<LinkProps, "href" | "children"> | ||
|
||
const NAVIGATION: FooterListItem[] = [ | ||
{ | ||
children: "Acre.fi", | ||
href: EXTERNAL_HREF.WEBSITE, | ||
}, | ||
{ | ||
children: "Docs", | ||
href: EXTERNAL_HREF.DOCS, | ||
}, | ||
{ | ||
children: "FAQ", | ||
href: EXTERNAL_HREF.FAQ, | ||
}, | ||
{ | ||
children: "Blog", | ||
href: EXTERNAL_HREF.BLOG, | ||
}, | ||
{ | ||
children: "Discord", | ||
href: EXTERNAL_HREF.DISCORD, | ||
}, | ||
{ | ||
children: "X", | ||
href: EXTERNAL_HREF.X, | ||
}, | ||
] | ||
|
||
const DOCUMENTS: FooterListItem[] = [ | ||
{ | ||
children: "Privacy Policy", | ||
href: EXTERNAL_HREF.PRIVACY_POLICY, | ||
}, | ||
{ | ||
children: "Terms of Use", | ||
href: EXTERNAL_HREF.TERMS_OF_USE, | ||
}, | ||
] | ||
|
||
const getItemsList = ( | ||
items: FooterListItem[], | ||
styles: ReturnType<typeof useMultiStyleConfig>, | ||
) => ( | ||
<List __css={styles.list}> | ||
{items.map((link) => ( | ||
<ListItem key={link.href}> | ||
<Button | ||
as={Link} | ||
__css={styles.link} | ||
iconSpacing={0} | ||
rightIcon={<Icon as={ArrowUpRight} />} | ||
{...link} | ||
isExternal | ||
/> | ||
</ListItem> | ||
))} | ||
</List> | ||
) | ||
|
||
export default function Footer() { | ||
const styles = useMultiStyleConfig("Footer") | ||
|
||
return ( | ||
<Box as="footer" __css={styles.container}> | ||
<Box __css={styles.wrapper}> | ||
<AcreSignIcon __css={styles.logo} /> | ||
|
||
{getItemsList(NAVIGATION, styles)} | ||
{getItemsList(DOCUMENTS, styles)} | ||
</Box> | ||
</Box> | ||
) | ||
} |
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,49 @@ | ||
import React, { useCallback } from "react" | ||
import { Link, ModalBody, ModalFooter, ModalHeader } from "@chakra-ui/react" | ||
import { TextSm } from "#/components/shared/Typography" | ||
import { EXTERNAL_HREF } from "#/constants" | ||
import { BaseModalProps } from "#/types" | ||
import { useAccessCode } from "#/hooks" | ||
import withBaseModal from "./ModalRoot/withBaseModal" | ||
import PasswordForm from "./shared/PasswordForm" | ||
import { PasswordFormValues } from "./shared/PasswordForm/PasswordFormBase" | ||
|
||
export function GateModalBase({ closeModal }: BaseModalProps) { | ||
const { saveAccessCode } = useAccessCode() | ||
|
||
const onSubmitForm = useCallback( | ||
(values: PasswordFormValues) => { | ||
const { password } = values | ||
if (!password) return | ||
|
||
closeModal() | ||
saveAccessCode(password) | ||
}, | ||
[closeModal, saveAccessCode], | ||
) | ||
|
||
return ( | ||
<> | ||
<ModalHeader>Enter password</ModalHeader> | ||
<ModalBody> | ||
<PasswordForm submitButtonText="Connect" onSubmitForm={onSubmitForm} /> | ||
</ModalBody> | ||
<ModalFooter pt={0}> | ||
<TextSm> | ||
Don’t have a password? Contact us on{" "} | ||
<Link | ||
fontWeight="bold" | ||
textDecoration="underline" | ||
href={EXTERNAL_HREF.DISCORD} | ||
isExternal | ||
> | ||
Discord | ||
</Link> | ||
</TextSm> | ||
</ModalFooter> | ||
</> | ||
) | ||
} | ||
|
||
const GateModal = withBaseModal(GateModalBase, { closeOnEsc: false }) | ||
export default GateModal |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.