diff --git a/front/app/_layout.tsx b/front/app/_layout.tsx index f45ddbd8..72c8fec3 100644 --- a/front/app/_layout.tsx +++ b/front/app/_layout.tsx @@ -1,5 +1,4 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import { prefix } from "inline-style-prefixer/lib"; import { Slot } from "one"; // import { WebTooltip } from "@kyoo/primitives/src/tooltip.web"; // import { HiddenIfNoJs, SkeletonCss, TouchOnlyCss } from "@kyoo/primitives"; @@ -8,7 +7,6 @@ import { StyleRegistryProvider, createStyleRegistry, useTheme } from "yoshiki/we import { Providers } from "~/providers"; const GlobalCssTheme = () => { - console.log(prefix("test")); const theme = useTheme(); // TODO: add fonts here // body {font-family: ${font.style.fontFamily};} @@ -68,27 +66,27 @@ export default function Layout() { // TODO: change this lang attr return ( - - - - Kyoo - - - - - - - - - + + + Kyoo + + + + + + + + {/* */} + - - - - - - - - + + + {/* */} + + {/* */} + {/* */} + + + ); } diff --git a/front/bun.lock b/front/bun.lock index c718ead0..2bacadfe 100644 --- a/front/bun.lock +++ b/front/bun.lock @@ -18,7 +18,6 @@ "react-native-safe-area-context": "5.1.0", "react-native-screens": "4.6.0", "react-native-web": "^0.19.13", - "vite-plugin-commonjs": "^0.10.4", }, "devDependencies": { "@biomejs/biome": "1.9.4", @@ -1683,8 +1682,6 @@ "lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], - "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], - "make-dir": ["make-dir@2.1.0", "", { "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA=="], "makeerror": ["makeerror@1.0.12", "", { "dependencies": { "tmpl": "1.0.5" } }, "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg=="], @@ -2303,10 +2300,6 @@ "vite-plugin-barrel": ["vite-plugin-barrel@0.4.1", "", { "dependencies": { "@swc/core": "1.7.26", "debug": "^4.3.4", "oxc-resolver": "1.9.3", "swc-plugin-barrel": "0.3.0" }, "peerDependencies": { "vite": "^5" } }, "sha512-79HEEzwmacSUjCHXEQcTRKA6I0QPMom+0nQRj/5eppDEKC1WFz2+m14wKrTxPmSeCe5MoCIitoJzrtDrj/YdRQ=="], - "vite-plugin-commonjs": ["vite-plugin-commonjs@0.10.4", "", { "dependencies": { "acorn": "^8.12.1", "magic-string": "^0.30.11", "vite-plugin-dynamic-import": "^1.6.0" } }, "sha512-eWQuvQKCcx0QYB5e5xfxBNjQKyrjEWZIR9UOkOV6JAgxVhtbZvCOF+FNC2ZijBJ3U3Px04ZMMyyMyFBVWIJ5+g=="], - - "vite-plugin-dynamic-import": ["vite-plugin-dynamic-import@1.6.0", "", { "dependencies": { "acorn": "^8.12.1", "es-module-lexer": "^1.5.4", "fast-glob": "^3.3.2", "magic-string": "^0.30.11" } }, "sha512-TM0sz70wfzTIo9YCxVFwS8OA9lNREsh+0vMHGSkWDTZ7bgd1Yjs5RV8EgB634l/91IsXJReg0xtmuQqP0mf+rg=="], - "vite-tsconfig-paths": ["vite-tsconfig-paths@5.1.4", "", { "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" }, "optionalPeers": ["vite"] }, "sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w=="], "vlq": ["vlq@1.0.1", "", {}, "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w=="], diff --git a/front/package.json b/front/package.json index 7ee9757c..fd63bc78 100644 --- a/front/package.json +++ b/front/package.json @@ -28,8 +28,7 @@ "react-native-reanimated": "~3.16.7", "react-native-safe-area-context": "5.1.0", "react-native-screens": "4.6.0", - "react-native-web": "^0.19.13", - "vite-plugin-commonjs": "^0.10.4" + "react-native-web": "^0.19.13" }, "devDependencies": { "@biomejs/biome": "1.9.4", diff --git a/front/src/providers.tsx b/front/src/providers.tsx index 88847f4c..313c33eb 100644 --- a/front/src/providers.tsx +++ b/front/src/providers.tsx @@ -1,7 +1,7 @@ // import { useUserTheme } from "@kyoo/models"; import { ThemeSelector } from "@kyoo/primitives"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { ComponentType, ReactNode, useState } from "react"; +import { ComponentType, type ReactNode, useState } from "react"; const QueryProvider = ({ children }: { children: ReactNode }) => { // const [queryClient] = useState(() => createQueryClient()); @@ -20,32 +20,10 @@ const ThemeProvider = ({ children }: { children: ReactNode }) => { ); }; -type ProviderComponent

= ComponentType<{ children: ReactNode } & P>; -type Provider = ProviderComponent; - -const withProviders = ( - providers: Provider[], -): ComponentType<{ - children: ReactNode; -}> => { - const ProviderImpl = ({ children }: { children: ReactNode }) => { - return providers.reduceRight( - (acc, Prov) => {acc}, - children, - ); - }; - return ProviderImpl; +export const Providers = ({ children }: { children: ReactNode }) => { + return ( + + {children} + + ); }; - -export const Providers = withProviders([ - QueryProvider, - // AccountProvider, - // HydratationBoundary, - ThemeProvider, - // PortalProvider, - // SnackbarProvider - // ConnectionErrorVerifier - // DownloadProvider - // NavigationThemeProvider - // WithLayout -]); diff --git a/front/vite.config.ts b/front/vite.config.ts index 9169a60f..8c157502 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -5,8 +5,13 @@ import type { UserConfig } from "vite"; export default { ssr: { // needed to fix ssr error of react-query - noExternal: true, + // noExternal: true, }, + // optimizeDeps: { + // esbuildOptions: { + // jsx: "automatic", + // }, + // }, plugins: [ one({ deps: { @@ -16,7 +21,13 @@ export default { "inline-style-prefixer": "interop", "inline-style-prefixer/**": "interop", "inline-style-prefixer/lib": "interop", - yoshiki: "interop", + yoshiki: { + "**/*.tsx": ["jsx"], + }, + // yoshiki: "exclude", + // "yoshiki > inline-style-prefixer/**": "interop", + // "yoshiki > inline-style-prefixer": "interop", + // "yoshiki > inline-style-prefixer/lib": "interop", }, }), ],