feat: 앱 시트·로그인 상태·지역 저장 틀, 공통 UI(Avatar·Chips·Rows·Credit)
This commit is contained in:
1 parent
e52f93fdbb
commit
28ff032160
8 files changed
+202
-15
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { useMemo, useState, type ReactNode } from 'react';
|
||||
|
||||
import { SheetContext, type SheetState } from '@/lib/sheet';
|
||||
|
||||
export function SheetProvider({ children }: { children: ReactNode }) {
|
||||
const [, setState] = useState<SheetState>(null);
|
||||
const api = useMemo(() => ({ open: (s: Exclude<SheetState, null>) => setState(s), close: () => setState(null) }), []);
|
||||
return <SheetContext value={api}>{children}</SheetContext>;
|
||||
}
|
||||
Reference in new issue
Block a user