Skip to content
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
2 changes: 1 addition & 1 deletion apps/app/src/features/theme/server/functions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { THEME_STORAGE_KEY } from "@init/utils/constants"
import { THEME_STORAGE_KEY } from "@init/ui/constants"
import { getCookie, setCookie } from "@tanstack/react-start/server"
import { ThemeSchema } from "#features/theme/validation.ts"
import { publicFunction } from "#shared/server/functions.ts"
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/features/theme/validation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { THEMES } from "@init/utils/constants"
import { THEMES } from "@init/ui/constants"
import * as z from "@init/utils/schema"

export const ThemeSchema = z.enum(THEMES)
2 changes: 1 addition & 1 deletion apps/desktop/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { QueryClient } from "@tanstack/react-query"
import { ThemeProvider } from "@init/ui/components/theme"
import { THEME_STORAGE_KEY } from "@init/utils/constants"
import { THEME_STORAGE_KEY } from "@init/ui/constants"
import { QueryClientProvider } from "@tanstack/react-query"
import { createHashHistory, createRouter, RouterProvider } from "@tanstack/react-router"
import { StrictMode } from "react"
Expand Down
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"./components/*": "./src/components/*.tsx",
"./blocks/*": "./src/blocks/*.tsx",
"./hooks/*": "./src/hooks/*.ts",
"./constants": "./src/constants.ts",
"./globals.css": "./src/styles/globals.css"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/theme.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { THEMES, type Theme } from "@init/utils/constants"
import { THEMES, type Theme } from "@init/ui/constants"
import { createContext, use, useEffect, useState } from "react"
import { Button } from "#components/button.tsx"
import {
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const THEMES = ["light", "dark", "system"] as const
export type Theme = (typeof THEMES)[number]

export const THEME_STORAGE_KEY = "init-theme"
3 changes: 0 additions & 3 deletions packages/utils/src/constants/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
export const APP_NAME = "Init"
export const APP_ID = "init"

export const THEMES = ["light", "dark", "system"] as const
export type Theme = (typeof THEMES)[number]
export const THEME_STORAGE_KEY = "init-theme"
export const I18N_COOKIE_NAME = "init-locale"