mirror of
https://github.com/ktds-dg0501/kt-event-marketing-fe.git
synced 2025-12-06 11:36:24 +00:00
- 로그인 페이지: 이메일 + 비밀번호 로그인, 소셜 로그인 버튼 - 회원가입 페이지: 3단계 funnel (계정정보, 개인정보, 사업장정보) - 프로필 관리 페이지: 기본정보/매장정보 수정, 비밀번호 변경, 로그아웃 - MUI v6 + React Hook Form + Zod 검증 - Next.js 14 App Router, TypeScript 5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
900 B
TypeScript
32 lines
900 B
TypeScript
import { create } from 'zustand';
|
|
|
|
interface UIState {
|
|
isLoading: boolean;
|
|
isSidebarOpen: boolean;
|
|
toast: {
|
|
open: boolean;
|
|
message: string;
|
|
severity: 'success' | 'error' | 'warning' | 'info';
|
|
};
|
|
setLoading: (isLoading: boolean) => void;
|
|
toggleSidebar: () => void;
|
|
showToast: (message: string, severity?: 'success' | 'error' | 'warning' | 'info') => void;
|
|
hideToast: () => void;
|
|
}
|
|
|
|
export const useUIStore = create<UIState>((set) => ({
|
|
isLoading: false,
|
|
isSidebarOpen: false,
|
|
toast: {
|
|
open: false,
|
|
message: '',
|
|
severity: 'info',
|
|
},
|
|
setLoading: (isLoading) => set({ isLoading }),
|
|
toggleSidebar: () => set((state) => ({ isSidebarOpen: !state.isSidebarOpen })),
|
|
showToast: (message, severity = 'info') =>
|
|
set({ toast: { open: true, message, severity } }),
|
|
hideToast: () =>
|
|
set((state) => ({ toast: { ...state.toast, open: false } })),
|
|
}));
|