Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix banner #493

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frontend-next/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { type Metadata } from 'next';
import { marianneFont } from '@/assets/fonts';
import { Matomo } from '@/components/matomo';
import { CookieBanner } from '@/components/cookie-banner/cookie-banner';
import { Suspense } from 'react';

export const metadata: Metadata = {
openGraph: {
Expand Down Expand Up @@ -39,7 +40,9 @@ export default function RootLayout({
>
<Matomo />
<body className='flex h-full flex-col font-app font-medium'>
<CookieBanner />
<Suspense>
<CookieBanner />
</Suspense>
<div className='flex min-h-full flex-col'>{children}</div>
</body>
</html>
Expand Down
37 changes: 18 additions & 19 deletions frontend-next/src/components/cookie-banner/cookie-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,23 @@ export function CookieBanner() {
<XMarkIcon className='w-6 h-6 cursor-pointer' onClick={closeBanner} />
</div>
<div className='mb-4 '>
Les cookies nous permettent de vous offrir des fonctionnalités utiles et
de mesurer les performances afin d’améliorer votre expérience. Veuillez
consulter notre politique de confidentialité pour en savoir plus.
<Link
className='underline ml-1 font-bold '
href='/donnees-personnelles'
target='_blank'
>
Données personnelles
</Link>
<br />
<p>
Les cookies nous permettent de vous offrir des fonctionnalités utiles
et de mesurer les performances afin d’améliorer votre expérience.
Veuillez consulter notre politique de confidentialité pour en savoir
plus:{' '}
<Link
className='underline mt-2 '
href='/donnees-personnelles'
target='_blank'
>
Données personnelles
</Link>
</p>

<p
onClick={handleChangePreference}
className='underline cursor-pointer'
className='underline cursor-pointer mt-2'
>
Voir la sélection
</p>
Expand All @@ -98,7 +101,7 @@ export function CookieBanner() {
</label>
</div>
) : null}
<div>
<div className='grid md:grid-cols-3 md:gap-2 space-y-1 md:space-y-0'>
<Button
className='rounded-none'
variant='outline'
Expand All @@ -107,17 +110,13 @@ export function CookieBanner() {
Accepter tous les cookies
</Button>
<Button
className=' ml-4 rounded-none'
className='rounded-none'
variant='outline'
onClick={acceptSelection}
>
Accepter la sélection
</Button>
<Button
className=' ml-4 rounded-none'
variant='outline'
onClick={hideBanner}
>
<Button className='rounded-none' variant='outline' onClick={hideBanner}>
Refuser tous les cookies
</Button>
</div>
Expand Down
Loading