Skip to content

Commit

Permalink
feat: cookies banner
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldas committed Sep 18, 2024
2 parents 1094b8a + 21a7b26 commit 88a73f4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [1.0.0-dev.116](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.115...v1.0.0-dev.116) (2024-09-18)


### Features

* update cookie policy link ([f643c42](https://github.com/powerhouse-inc/document-model-electron/commit/f643c42fd3e3fcd85124350bcc748a98e375ff40))

# [1.0.0-dev.115](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.114...v1.0.0-dev.115) (2024-09-17)


### Features

* fixed revisions history scroll ([cfa4e47](https://github.com/powerhouse-inc/document-model-electron/commit/cfa4e473d10333ac876d4c45650fc09eaf1e9127))

# [1.0.0-dev.114](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.113...v1.0.0-dev.114) (2024-09-17)


Expand Down
1 change: 0 additions & 1 deletion src/components/cookie-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const CookieBanner = () => {
];

const handleAccept = (cookies: CookieInput[]) => {
console.log(cookies);
setShowBanner(false);

if (isCookieAccepted(cookies, 'analytics-cookie')) {
Expand Down
8 changes: 5 additions & 3 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ import {
Icon,
} from '@powerhousedao/design-system';
import { Trans } from 'react-i18next';
import { useCookieBanner } from 'src/hooks/useCookieBanner';
import { openUrl } from 'src/utils/openUrl';
import { useModal } from './modal';

export const Footer = () => {
const { showModal } = useModal();
const [, setShowCookieBanner] = useCookieBanner();

return (
<DesignSystemFooter>
<FooterLink
onClick={() =>
openUrl('https://expenses.makerdao.network/cookies-policy')
}
onClick={() => {
setShowCookieBanner(true);
}}
>
<Trans i18nKey="footer.cookiePolicy" />
</FooterLink>
Expand Down
2 changes: 1 addition & 1 deletion src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ type ImportMetaEnv = {
PH_CONNECT_ROUTER_BASENAME: string
PH_CONNECT_DEFAULT_DRIVES_URL: string
PH_CONNECT_ENABLED_EDITORS: string
PH_CONNECT_DISABLE_ADD_PUBLIC_DRIVES: string
PH_CONNECT_SEARCH_BAR_ENABLED: string
PH_CONNECT_DISABLE_ADD_PUBLIC_DRIVES: string
PH_CONNECT_DISABLE_ADD_CLOUD_DRIVES: string
PH_CONNECT_DISABLE_ADD_LOCAL_DRIVES: string
PH_CONNECT_DISABLE_DELETE_PUBLIC_DRIVES: string
Expand Down

0 comments on commit 88a73f4

Please sign in to comment.