mirror of
https://github.com/khairul169/home-lab.git
synced 2025-06-18 01:29:34 +07:00
13 lines
288 B
TypeScript
13 lines
288 B
TypeScript
|
import { FileItem } from "@/types/files";
|
||
|
import { createContext, useContext } from "react";
|
||
|
|
||
|
type FilesContextType = {
|
||
|
files: FileItem[];
|
||
|
};
|
||
|
|
||
|
export const FilesContext = createContext<FilesContextType>({
|
||
|
files: [],
|
||
|
});
|
||
|
|
||
|
export const useFilesContext = () => useContext(FilesContext);
|