251121_01_ENH : 로그인 및 인증 저장, api통신 시 자동으로 accessKey 붙게 조치
This commit is contained in:
23
src/store/jotai/project.ts
Normal file
23
src/store/jotai/project.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import { StorageKeys } from "@/store/storage/storage-keys";
|
||||
import {createSessionStorageAtom} from "@/store/jotai/utils";
|
||||
import {AuthState} from "@/store/jotai/auth";
|
||||
|
||||
export type SelectedProject = {
|
||||
id: string;
|
||||
name: string;
|
||||
// 필요하면 여기서 추가 (code, status 등)
|
||||
};
|
||||
|
||||
/**
|
||||
* 탭별로 유지되는 선택 프로젝트 정보
|
||||
* - 새로고침: 유지
|
||||
* - 같은 탭: 유지
|
||||
* - 탭/브라우저 닫으면: 삭제
|
||||
*/
|
||||
export const selectedProjectAtom =
|
||||
createSessionStorageAtom<SelectedProject | null>(
|
||||
StorageKeys.SelectedProject,
|
||||
null,
|
||||
);
|
||||
Reference in New Issue
Block a user