feat(cookies): MIN-201 add initial cookie banner
1 unresolved thread
1 unresolved thread
Short description:
Added initial cookie banner
Approach:
Implemented a CookieBanner component to inform users about cookies. The component conditionally displays a banner with the option to accept cookies, read more about the policy, and automatically accepts cookies. Redux manages the state, and local storage persists user preferences.
Merge request reports
Activity
Filter activity
assigned to @mateusz-winiarczyk
1 import { selectCookieBanner } from '@/redux/cookieBanner/cookieBanner.selector'; 2 import { acceptCookies, showBanner } from '@/redux/cookieBanner/cookieBanner.slice'; 3 import { useAppDispatch } from '@/redux/hooks/useAppDispatch'; 4 import { useAppSelector } from '@/redux/hooks/useAppSelector'; 5 import { Button } from '@/shared/Button'; 6 import Link from 'next/link'; 7 import { useEffect } from 'react'; 8 import { USER_ACCEPTED_COOKIES_COOKIE_NAME } from './CookieBanner.constants'; 9 10 export const CookieBanner = (): React.ReactNode => { 11 const dispatch = useAppDispatch(); 12 const { visible, accepted } = useAppSelector(selectCookieBanner); 13 14 useEffect(() => { 15 const isAccepted = localStorage.getItem(USER_ACCEPTED_COOKIES_COOKIE_NAME) === 'true'; changed this line in version 2 of the diff
added 1 commit
- 146f34f7 - refactor(cookies): extract cookie value to an constant
added 23 commits
-
146f34f7...a185dfbb - 22 commits from branch
development
- 4a2009bd - Merge remote-tracking branch 'origin/development' into MIN-201-initial-cookie-banner
-
146f34f7...a185dfbb - 22 commits from branch
added 3 commits
-
4a2009bd...eb6edcc7 - 2 commits from branch
development
- aae96ea2 - Merge remote-tracking branch 'origin/development' into MIN-201-initial-cookie-banner
-
4a2009bd...eb6edcc7 - 2 commits from branch
mentioned in commit fc11105a
Please register or sign in to reply