diff --git a/front/app/_layout.tsx b/front/app/_layout.tsx index 2eab9e0e..d62a799c 100644 --- a/front/app/_layout.tsx +++ b/front/app/_layout.tsx @@ -1,7 +1,7 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import { Slot } from "one"; import { useServerHeadInsertion } from "one"; -import { StyleRegistryProvider, createStyleRegistry, useTheme } from "yoshiki/web"; +import { StyleRegistryProvider, createStyleRegistry } from "yoshiki/web"; import { Providers } from "~/providers"; const GlobalCssTheme = () => { diff --git a/front/app/_middleware.ts b/front/app/_middleware.ts index 51d61f9a..c3e4053b 100644 --- a/front/app/_middleware.ts +++ b/front/app/_middleware.ts @@ -1,7 +1,6 @@ import { createMiddleware, setServerData } from "one"; export default createMiddleware(({ request, next }) => { - console.log(request); setServerData("cookies", request.headers.get("Cookies") ?? ""); return next(); }); diff --git a/front/src/primitives/theme/theme.tsx b/front/src/primitives/theme/theme.tsx index fbd134bb..1c43d605 100644 --- a/front/src/primitives/theme/theme.tsx +++ b/front/src/primitives/theme/theme.tsx @@ -1,9 +1,9 @@ import type { Property } from "csstype"; import type { ReactNode } from "react"; import { Platform, type TextStyle } from "react-native"; -import { type Theme, ThemeProvider, useAutomaticTheme } from "yoshiki"; +import { type Theme, ThemeProvider as WebThemeProvider, useAutomaticTheme } from "yoshiki"; import "yoshiki"; -import { useTheme, useYoshiki } from "yoshiki/native"; +import { ThemeProvider, useTheme, useYoshiki } from "yoshiki/native"; import "yoshiki/native"; import { catppuccin } from "./catppuccin"; @@ -127,7 +127,11 @@ export const ThemeSelector = ({ }) => { const newTheme = selectMode({ ...catppuccin, font }, theme); - return {children as any}; + return ( + + {children as any} + + ); }; export type YoshikiFunc = (props: ReturnType) => T; @@ -190,4 +194,3 @@ export const ContrastArea = ({ export const alpha = (color: Property.Color, alpha: number) => { return color + Math.round(alpha * 255).toString(16); }; - diff --git a/front/src/ui/errors/index.tsx b/front/src/ui/errors/index.tsx index 0812e381..a8839645 100644 --- a/front/src/ui/errors/index.tsx +++ b/front/src/ui/errors/index.tsx @@ -2,7 +2,7 @@ import type { FC } from "react"; import type { KyooError } from "~/models"; import { ConnectionError } from "./connection"; import { OfflineView } from "./offline"; -import { SetupPage } from "./setup"; +// import { SetupPage } from "./setup"; import { Unauthorized } from "./unauthorized"; export * from "./error"; @@ -15,7 +15,7 @@ export type ErrorHandler = { export const errorHandlers: Record = { unauthorized: { view: Unauthorized, forbid: "app" }, - setup: { view: SetupPage, forbid: "setup" }, + // setup: { view: SetupPage, forbid: "setup" }, connection: { view: ConnectionError }, offline: { view: OfflineView }, }; diff --git a/front/vite.config.ts b/front/vite.config.ts index 4c081d64..2ac48b9a 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -5,6 +5,16 @@ export default { ssr: { noExternal: ["@tanstack/react-query", "@tanstack/react-query-devtools"], }, + server: { + proxy: { + "/api": { + target: process.env.KYOO_URL ?? "http://back/api", + changeOrigin: true, + // without this we have two /api at the start + rewrite: (path) => path.replace(/^\/api/, ""), + }, + }, + }, plugins: [ one({ deps: {