refactor: 프론트 템플릿 리펙토링
This commit is contained in:
@@ -10,7 +10,7 @@ import type {
|
||||
ApplicationApi,
|
||||
SessionState,
|
||||
} from "../../application/ports/in/application-api.ts";
|
||||
import { useApplication } from "./application-provider.tsx";
|
||||
import { useApplicationSession } from "./application-provider.tsx";
|
||||
|
||||
export type SessionContextValue = Readonly<{
|
||||
sessionState: SessionState;
|
||||
@@ -24,7 +24,7 @@ const SessionContext = createContext<SessionContextValue | null>(null);
|
||||
export function SessionProvider({
|
||||
children,
|
||||
}: Readonly<{ children: ReactNode }>) {
|
||||
const { session } = useApplication();
|
||||
const session = useApplicationSession();
|
||||
const sessionState = useSyncExternalStore(
|
||||
session.subscribe,
|
||||
session.getSnapshot,
|
||||
|
||||
Reference in New Issue
Block a user