빌드 오류 수정

This commit is contained in:
2025-10-17 15:38:01 +09:00
parent 44d04d7532
commit 9c9ddbfcd7
3 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import "@fontsource-variable/noto-sans-kr";
import { AppProvider } from "./providers"; import { AppProvider } from "./providers";
import { cookies } from "next/headers"; import { cookies } from "next/headers";
import Script from "next/script";
const App = async ({ children }: Readonly<{ children: React.ReactNode }>) => { const App = async ({ children }: Readonly<{ children: React.ReactNode }>) => {
const theme = (await cookies()).get("site-theme-key"); const theme = (await cookies()).get("site-theme-key");
@@ -11,7 +12,7 @@ const App = async ({ children }: Readonly<{ children: React.ReactNode }>) => {
return ( return (
<html lang="ko" data-theme={theme?.value}> <html lang="ko" data-theme={theme?.value}>
<head> <head>
<script src="/tinymce/tinymce.min.js"></script> <Script src="/tinymce/tinymce.min.js" strategy="afterInteractive" />
</head> </head>
<body> <body>
<AppProvider>{children}</AppProvider> <AppProvider>{children}</AppProvider>
+2 -2
View File
@@ -4,14 +4,14 @@ import "@fontsource-variable/noto-sans-kr";
import { cookies } from "next/headers"; import { cookies } from "next/headers";
import { AppProvider } from "./providers/app-provider"; import { AppProvider } from "./providers/app-provider";
import Script from "next/script";
const App = async ({ children }: Readonly<{ children: React.ReactNode }>) => { const App = async ({ children }: Readonly<{ children: React.ReactNode }>) => {
const theme = (await cookies()).get("site-theme-key"); const theme = (await cookies()).get("site-theme-key");
return ( return (
<html lang="ko" data-theme={theme?.value}> <html lang="ko" data-theme={theme?.value}>
<head> <head>
<script src="/tinymce/tinymce.min.js"></script> <Script src="/tinymce/tinymce.min.js" strategy="afterInteractive" />
</head> </head>
<body> <body>
<AppProvider>{children}</AppProvider> <AppProvider>{children}</AppProvider>
@@ -24,6 +24,8 @@ export class TokenManager {
setCookie(key, value, { setCookie(key, value, {
secure: window.location.protocol === "https:", secure: window.location.protocol === "https:",
sameSite: "lax", sameSite: "lax",
domain: domain,
path: "/", // 모든 경로에서 접근 가능
}); });
} }
@@ -46,7 +48,8 @@ export class TokenManager {
} }
public removeToken(key: string): void { public removeToken(key: string): void {
removeCookie(key); const domain = this.getCookieDomain();
removeCookie(key, { domain, path: "/" });
} }
public setupRefreshTimer( public setupRefreshTimer(