Skip to content

Commit

Permalink
feat: Footer component integration
Browse files Browse the repository at this point in the history
  • Loading branch information
gpuente committed Sep 12, 2024
1 parent d0a09f3 commit b9e6355
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
} from '@powerhousedao/design-system';
import { useAtomValue } from 'jotai';
import React, { Suspense } from 'react';
import { Footer } from 'src/components/footer';
import { ModalManager } from 'src/components/modal';
import { PHLogo } from 'src/components/ph-logo';
import { ReadModeContextProvider } from 'src/context/read-mode';
import atoms from 'src/store';

Expand Down Expand Up @@ -34,7 +34,7 @@ export default (
<ToastContainer position="bottom-right" />
<ModalManager>
<Router />
<PHLogo />
<Footer />
</ModalManager>
</UiNodesContextProvider>
</ReadModeContextProvider>
Expand Down
50 changes: 50 additions & 0 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import {
Footer as DesignSystemFooter,
FooterLink,
Icon,
} from '@powerhousedao/design-system';
import { Trans } from 'react-i18next';
import { openUrl } from 'src/utils/openUrl';

export const Footer = () => {
return (
<DesignSystemFooter className="fixed bottom-8 right-8">
<FooterLink
onClick={() =>
openUrl('https://expenses.makerdao.network/cookies-policy')
}
>
<Trans i18nKey="footer.cookiePolicy" />
</FooterLink>
<FooterLink
onClick={() => openUrl('https://docs.sky.money/legal-terms')}
>
<Trans i18nKey="footer.termsOfUse" />
</FooterLink>
<FooterLink
onClick={() =>
openUrl('https://expenses.makerdao.network/disclaimer')
}
>
<Trans i18nKey="footer.disclaimer" />
</FooterLink>
<FooterLink
id="ph-logo-link"
onClick={() => openUrl('https://www.powerhouse.inc/')}
>
<Trans
i18nKey="footer.builtWith"
components={{
icon: (
<Icon
name="PHLogoSmall"
size={16}
className="mx-1"
/>
),
}}
/>
</FooterLink>
</DesignSystemFooter>
);
};
6 changes: 6 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,11 @@
"driveSyncError": "Error synchronizing drive {{drive}}",
"driveSyncConflict": "Conflict error detected in {{drive}}",
"reloadApp": "It seems like you're running an outdated version of the app. Please reload Connect to get the latest version."
},
"footer": {
"cookiePolicy": "Cookie Policy",
"termsOfUse": "Terms of Use",
"disclaimer": "Disclaimer",
"builtWith": "Built with <icon /> Powerhouse"
}
}

0 comments on commit b9e6355

Please sign in to comment.