-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { mapLocationType } from '@/app/_types/Map'; | ||
import { create } from 'zustand'; | ||
|
||
|
||
// Zustand 스토어 타입 정의 | ||
interface TitleState { | ||
title: string; // 초기값이 비어 있을 수 있음 | ||
setTitle: (update: Partial<string>) => void; // Partial을 사용하여 선택적 업데이트 지원 | ||
} | ||
|
||
// Zustand 스토어 생성 | ||
const useTitleStore = create<TitleState>((set, get) => ({ | ||
title: '', | ||
setTitle: (newTitle: string) => set(() => ({ title: newTitle })), | ||
})); | ||
|
||
export default useTitleStore; |