fix: moved projects from redux to context

This commit is contained in:
2025-07-30 22:11:31 +04:00
parent 128a1b3c4f
commit 8af4a908e6
6 changed files with 113 additions and 57 deletions

View File

@ -0,0 +1,25 @@
import { useEffect, useState } from "react";
import { ProjectSchema } from "@/types/ProjectSchema";
const useProjects = () => {
const [projects, setProjects] = useState<ProjectSchema[]>([]);
useEffect(() => {
const mockProjects = [
{ id: 1, name: "Проект 1" },
{ id: 2, name: "Проект 2" },
{ id: 3, name: "Проект 3" },
];
setProjects(mockProjects);
}, []);
const refetchProjects = () => {};
return {
projects,
setProjects,
refetchProjects,
};
};
export default useProjects;