Skip to content

Commit

Permalink
Merge pull request #529 from powerhouse-inc/update-connect-footer
Browse files Browse the repository at this point in the history
feat: added disclaimer update to connect footer
  • Loading branch information
gpuente authored Sep 13, 2024
2 parents 3997440 + 6726595 commit a39fb4b
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 22 deletions.
20 changes: 10 additions & 10 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.171",
"@powerhousedao/design-system": "1.0.0-alpha.174",
"@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.87.0",
"document-model-libs": "^1.88.0",
"electron-is-dev": "^3.0.1",
"electron-squirrel-startup": "^1.0.0",
"electron-store": "^8.1.0",
Expand Down
14 changes: 4 additions & 10 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import {
} from '@powerhousedao/design-system';
import { Trans } from 'react-i18next';
import { openUrl } from 'src/utils/openUrl';
import { useModal } from './modal';

export const Footer = () => {
const { showModal } = useModal();

return (
<DesignSystemFooter className="fixed bottom-8 right-8">
<FooterLink
Expand All @@ -16,16 +19,7 @@ export const Footer = () => {
>
<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')
}
>
<FooterLink onClick={() => showModal('disclaimerModal', {})}>
<Trans i18nKey="footer.disclaimer" />
</FooterLink>
<FooterLink
Expand Down
24 changes: 24 additions & 0 deletions src/components/modal/modals/DisclaimerModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ReadRequiredModal } from '@powerhousedao/design-system';
import React from 'react';
import { useTranslation } from 'react-i18next';

export interface DisclaimerModalProps {
open: boolean;
onClose: () => void;
}

export const DisclaimerModal: React.FC<DisclaimerModalProps> = props => {
const { open, onClose } = props;

const { t } = useTranslation();

return (
<ReadRequiredModal
open={open}
header={t('modals.disclaimer.title')}
body={t('modals.disclaimer.body')}
closeLabel="Close"
onContinue={() => onClose()}
/>
);
};
2 changes: 2 additions & 0 deletions src/components/modal/modals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { CreateDocumentModal } from './CreateDocumentModal';
import { DebugSettingsModal } from './DebugSettingsModal';
import { DeleteDriveModal } from './DeleteDriveModal';
import { DeleteItemModal } from './DeleteItemModal';
import { DisclaimerModal } from './DisclaimerModal';
import { DriveSettingsModal } from './DriveSettingsModal';
import { SettingsModal } from './SettingsModal';
import { UpgradeDriveModal } from './UpgradeDriveModal';
Expand All @@ -20,6 +21,7 @@ export const modals = {
confirmationModal: ConfirmationModal,
deleteDriveModal: DeleteDriveModal,
debugSettingsModal: DebugSettingsModal,
disclaimerModal: DisclaimerModal,
} as const;

export type Modals = typeof modals;
Expand Down
4 changes: 4 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
"exportDocumentWithErrors": {
"title": "Your document contains errors",
"body": "Your document contains structure errors. Do you want to export it anyway?"
},
"disclaimer": {
"title": "Disclaimer",
"body": "All content provided herein our website, hyperlinked sites, associated applications, forums, blogs, social media accounts and other platforms (“Site”) is for your general information only, procured from third party sources. We make no warranties of any kind in relation to our content, including but not limited to accuracy and updatedness. No part of the content that we provide constitutes financial advice, legal advice or any other form of advice meant for your specific reliance for any purpose. Any use or reliance on our content is solely at your own risk and discretion. You should conduct your own research, review, analyse and verify our content before relying on them. Trading is a highly risky activity that can lead to major losses, please therefore consult your financial advisor before making any decision. No content on our Site is meant to be a solicitation or offer."
}
},
"notifications": {
Expand Down

0 comments on commit a39fb4b

Please sign in to comment.