-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: dennyscode <[email protected]> Co-authored-by: Denny San <[email protected]> Co-authored-by: Thomas Cherret <[email protected]> Co-authored-by: Sébastien BRAMILLE <[email protected]>
- Loading branch information
1 parent
08ade85
commit 9e46651
Showing
136 changed files
with
2,253 additions
and
2,848 deletions.
There are no files selected for viewing
448 changes: 224 additions & 224 deletions
448
.yarn/releases/yarn-4.4.0.cjs → .yarn/releases/yarn-4.5.0.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,13 @@ | ||
import { ThemeProviderV2 } from '@/providers/ThemeProviderV2'; | ||
import { ThemeProvider as NextThemeProvider } from 'next-themes'; | ||
import { cookies } from 'next/headers'; | ||
import React from 'react'; | ||
import type { Metadata } from 'next'; | ||
import type { PropsWithChildren } from 'react'; | ||
import { Layout } from 'src/Layout'; | ||
|
||
export default async function PartnerThemeLayout({ | ||
children, | ||
params: { partnerTheme }, | ||
}: { | ||
children: React.ReactNode; | ||
params: { partnerTheme: string }; | ||
}) { | ||
const cookiesHandler = cookies(); | ||
export const metadata: Metadata = { | ||
other: { | ||
'partner-theme': 'default', | ||
}, | ||
}; | ||
|
||
return ( | ||
<NextThemeProvider | ||
themes={['light', 'dark']} | ||
defaultTheme={'system'} | ||
enableSystem | ||
enableColorScheme | ||
> | ||
<ThemeProviderV2 | ||
themes={[]} | ||
activeTheme={cookiesHandler.get('theme')?.value || 'system'} | ||
> | ||
<Layout>{children}</Layout> | ||
</ThemeProviderV2> | ||
</NextThemeProvider> | ||
); | ||
export default async function InfosLayout({ children }: PropsWithChildren) { | ||
return <Layout>{children}</Layout>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,24 @@ | ||
import React from 'react'; | ||
import { getCookies } from '@/app/lib/getCookies'; | ||
import { FeatureCards } from '@/components/FeatureCards'; | ||
import { getPartnerThemes } from '@/app/lib/getPartnerThemes'; | ||
import { cookies } from 'next/headers'; | ||
import { ThemeProviderV2 } from '@/providers/ThemeProviderV2'; | ||
import type { Metadata } from 'next'; | ||
import type { PropsWithChildren } from 'react'; | ||
import { Layout } from 'src/Layout'; | ||
import { ThemeProvider as NextThemeProvider } from 'next-themes'; | ||
import App from '../../ui/app/App'; | ||
|
||
export default async function MainLayout({ | ||
children, | ||
params: { lng }, | ||
}: { | ||
children: React.ReactNode; | ||
params: { lng: string }; | ||
}) { | ||
const partnerThemes = await getPartnerThemes(); | ||
export const metadata: Metadata = { | ||
other: { | ||
'partner-theme': 'default', | ||
}, | ||
}; | ||
|
||
const cookiesHandler = cookies(); | ||
|
||
const defaultTheme = 'default'; | ||
|
||
// provider for the theme context, it is used to provide the theme to the whole app, must be into the layout.tsx or page.tsx. | ||
export default async function MainLayout({ children }: PropsWithChildren) { | ||
const { activeTheme } = getCookies(); | ||
return ( | ||
<NextThemeProvider | ||
themes={[ | ||
'dark', | ||
'light', | ||
...partnerThemes.data.map((d) => d.attributes.uid), | ||
]} | ||
defaultTheme={defaultTheme} | ||
enableSystem | ||
enableColorScheme | ||
> | ||
<ThemeProviderV2 | ||
activeTheme={cookiesHandler.get('theme')?.value || defaultTheme} | ||
themes={partnerThemes.data} | ||
> | ||
<Layout>{children}</Layout> | ||
<FeatureCards /> | ||
</ThemeProviderV2> | ||
</NextThemeProvider> | ||
<> | ||
<Layout> | ||
<App activeTheme={activeTheme}>{children}</App> | ||
</Layout> | ||
<FeatureCards /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,18 @@ | ||
import { getCookies } from '@/app/lib/getCookies'; | ||
import { Widgets } from '@/components/Widgets'; | ||
import { Widget } from '@/components/Widgets/Widget'; | ||
import App from '../../ui/app/App'; | ||
|
||
export default function Page() { | ||
const variant = 'default'; // exchange | ||
const { activeThemeMode, activeTheme, welcomeScreenClosed } = getCookies(); | ||
const isWelcomeScreenClosed = welcomeScreenClosed === 'true'; | ||
const { activeThemeMode, activeTheme } = getCookies(); | ||
return ( | ||
<App | ||
starterVariant={variant} | ||
isWelcomeScreenClosed={isWelcomeScreenClosed} | ||
activeTheme={activeTheme} | ||
> | ||
<> | ||
<Widget | ||
activeTheme={activeTheme} | ||
starterVariant={variant} | ||
activeThemeMode={activeThemeMode} | ||
isWelcomeScreenClosed={isWelcomeScreenClosed} | ||
/> | ||
<Widgets | ||
closedWelcomeScreen={isWelcomeScreenClosed} | ||
widgetVariant={variant} | ||
/> | ||
</App> | ||
<Widgets widgetVariant={variant} /> | ||
</> | ||
); | ||
} |
Oops, something went wrong.