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 76e5a16
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 21 deletions.
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
"@powerhousedao/design-system": "^1.0.0-alpha.168",
"@powerhousedao/design-system": "1.0.0-alpha.171",
"@sentry/react": "^7.109.0",
"@sentry/vite-plugin": "^2.22.2",
"@tanstack/react-virtual": "^3.8.1",
"did-key-creator": "^1.2.0",
"document-drive": "^1.0.0-alpha.94",
"document-model": "^1.8.0",
"document-model-libs": "^1.85.0",
"document-model-libs": "^1.87.0",
"electron-is-dev": "^3.0.1",
"electron-squirrel-startup": "^1.0.0",
"electron-store": "^8.1.0",
Expand Down
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="PowerhouseLogoSmall"
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 76e5a16

Please sign in to comment.