feat: hey-api and projects fetch
This commit is contained in:
@ -1,25 +0,0 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user