mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
컴포넌트를 도메인과 무관한 UI 컴포넌트와 도메인 컴포넌트로 재구성하고 중복된 파일 목록 컴포넌트 통합 및 모듈 간 의존성 방향을 ESLint로 강제
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e82c5e556
commit
877cf9c42e
94 files changed
+398
-518
No files matched your search
@@ -1,18 +1,20 @@
|
||||
import { getContext, setContext } from "svelte";
|
||||
import type { SelectedCategory } from "#lib/components/molecules/index.js";
|
||||
import { createContext as createSvelteContext } from "svelte";
|
||||
import type { SelectedCategory } from "#lib/features/filesystem/components/index.js";
|
||||
|
||||
export interface SelectedFile {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface Context {
|
||||
selectedCategory?: SelectedCategory;
|
||||
}
|
||||
|
||||
const [getContext, setContext] = createSvelteContext<Context>();
|
||||
|
||||
export const createContext = () => {
|
||||
const context = $state({
|
||||
selectedCategory: undefined as SelectedCategory | undefined,
|
||||
});
|
||||
return setContext("context", context);
|
||||
const context: Context = $state({});
|
||||
return setContext(context);
|
||||
};
|
||||
|
||||
export const useContext = () => {
|
||||
return getContext<ReturnType<typeof createContext>>("context");
|
||||
};
|
||||
export const useContext = getContext;
|
||||
Reference in new issue
Block a user