From f6f6c61fd346f126740698bdeec19c70ebe0517c Mon Sep 17 00:00:00 2001 From: martapanc Date: Sun, 27 Aug 2023 19:06:02 +0200 Subject: [PATCH] feat: select language wip --- package.json | 1 - src/app/(public)/layout-client.tsx | 21 ++-- .../LanguageSwitcher/LanguageSwitcher.tsx | 113 ++++++++++++------ src/components/helpers/MuiThemeProvider.tsx | 29 +++++ src/theme/createEmotionCache.ts | 7 ++ src/theme/index.ts | 37 ++++++ 6 files changed, 163 insertions(+), 45 deletions(-) create mode 100644 src/components/helpers/MuiThemeProvider.tsx create mode 100644 src/theme/createEmotionCache.ts create mode 100644 src/theme/index.ts diff --git a/package.json b/package.json index e20e2b5..bc0fc27 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ }, "dependencies": { "@apollo/client": "^3.8.1", - "@chakra-ui/react": "^2.8.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@heroicons/react": "^2.0.18", diff --git a/src/app/(public)/layout-client.tsx b/src/app/(public)/layout-client.tsx index 7054401..674f394 100644 --- a/src/app/(public)/layout-client.tsx +++ b/src/app/(public)/layout-client.tsx @@ -1,19 +1,24 @@ 'use client'; -import { ThemeProvider } from 'next-themes'; -import type { PropsWithChildren } from 'react'; +import {ThemeProvider as NextThemeProvider, } from 'next-themes'; +import type {PropsWithChildren} from 'react'; +import MuiThemeProvider from "@/components/helpers/MuiThemeProvider"; import Footer from '@/components/layout/Footer'; import Header from '@/components/layout/Header'; -export default function LayoutClient({ children }: PropsWithChildren) { +export default function LayoutClient({children}: PropsWithChildren) { + return ( - -
+ + + +
-
{children}
+
{children}
-