create-sonamu 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/src/packages/api/package.json +1 -1
- package/template/src/packages/api/src/sonamu.config.ts +2 -2
- package/template/src/packages/web/package.json.bak +2 -1
- package/template/src/packages/web/src/App.tsx +3 -3
- package/template/src/packages/web/src/lib/auth-client.ts +3 -0
package/package.json
CHANGED
|
@@ -49,8 +49,8 @@ export default defineConfig({
|
|
|
49
49
|
// nothing yet
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
auth:{
|
|
52
|
+
|
|
53
|
+
auth: {
|
|
54
54
|
emailAndPassword: { enabled: true },
|
|
55
55
|
baseURL: process.env.BETTER_AUTH_URL ?? `http://${host}:${port}`,
|
|
56
56
|
secret: process.env.BETTER_AUTH_SECRET ?? "miomock-secret-key-change-this-in-production",
|
|
@@ -3,7 +3,7 @@ import { useRouterState } from "@tanstack/react-router";
|
|
|
3
3
|
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
|
4
4
|
import { type ReactNode, Suspense, useEffect } from "react";
|
|
5
5
|
import Sidebar from "./components/Sidebar";
|
|
6
|
-
import { setLocale } from "./i18n/sd.generated";
|
|
6
|
+
import { SUPPORTED_LOCALES, setLocale } from "./i18n/sd.generated";
|
|
7
7
|
|
|
8
8
|
interface AppProps {
|
|
9
9
|
children?: ReactNode;
|
|
@@ -17,8 +17,8 @@ function App({ children }: AppProps) {
|
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
// 브라우저 locale 감지
|
|
19
19
|
const browserLocale = navigator.language.split("-")[0];
|
|
20
|
-
if (
|
|
21
|
-
setLocale(browserLocale as
|
|
20
|
+
if (SUPPORTED_LOCALES.includes(browserLocale as typeof SUPPORTED_LOCALES[number])) {
|
|
21
|
+
setLocale(browserLocale as typeof SUPPORTED_LOCALES[number]);
|
|
22
22
|
}
|
|
23
23
|
}, []);
|
|
24
24
|
|