This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
136 additions
and
207 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Box, Link, styled, } from '@mui/material'; | ||
import React, { useState, } from 'react'; | ||
import { useTranslation, } from 'react-i18next'; | ||
|
||
import { About, Disclaimer, Privacy, Terms, } from '../screens'; | ||
|
||
import { Footer, } from './Footer'; | ||
|
||
const ClickableLink = styled(Link)` | ||
cursor : pointer; | ||
`; | ||
|
||
export const PopUpFooter = () => { | ||
const [ showTerms, setShowTerms, ] = useState<boolean>(false); | ||
const [ showPrivacy, setShowPrivacy, ] = useState<boolean>(false); | ||
const [ showDisclaimer, setShowDisclaimer, ] = useState<boolean>(false); | ||
const [ showAbout, setShowAbout, ] = useState<boolean>(false); | ||
|
||
const { t, } = useTranslation(); | ||
|
||
const handleShowTerms = () => setShowTerms(true); | ||
|
||
const handleShowPrivacy = () => setShowPrivacy(true); | ||
|
||
const handleShowDisclaimer = () => setShowDisclaimer(true); | ||
|
||
const handleShowAbout = () => setShowAbout(true); | ||
|
||
const handleCloseTerms = () => setShowTerms(false); | ||
|
||
const handleClosePrivacy = () => setShowPrivacy(false); | ||
|
||
const handleCloseDisclaimer = () => setShowDisclaimer(false); | ||
|
||
const handleCloseAbout = () => setShowAbout(false); | ||
|
||
return ( | ||
<> | ||
<Footer> | ||
<Box margin={2}> | ||
<ClickableLink onClick={handleShowTerms}>{t('label_terms_title')}</ClickableLink> | ||
</Box> | ||
<Box margin={2}> | ||
<ClickableLink onClick={handleShowPrivacy}>{t('label_privacy_title')}</ClickableLink> | ||
</Box> | ||
<Box margin={2}> | ||
<ClickableLink onClick={handleShowDisclaimer}>{t('label_disclaimer_title')}</ClickableLink> | ||
</Box> | ||
<Box margin={2}> | ||
<ClickableLink onClick={handleShowAbout}>{t('label_about_title')}</ClickableLink> | ||
</Box> | ||
</Footer> | ||
{showTerms && <Terms onClose={handleCloseTerms} />} | ||
{showPrivacy && <Privacy onClose={handleClosePrivacy} />} | ||
{showDisclaimer && <Disclaimer onClose={handleCloseDisclaimer} />} | ||
{showAbout && <About onClose={handleCloseAbout} />} | ||
</> | ||
); | ||
}; |
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
Oops, something went wrong.