full update

This commit is contained in:
payacom
2026-07-18 14:29:05 +03:30
parent 17f334d0f1
commit af5b27b610
239 changed files with 10283 additions and 3041 deletions

23
src/api/fetchProject.ts Normal file
View File

@@ -0,0 +1,23 @@
import { getApiBaseUrl } from "@/components/main/BaseUrl";
import { Project } from "@/types/types";
export async function fetchProject(
id: string,
token = ""
): Promise<Project | null> {
try {
const response = await fetch(`${getApiBaseUrl()}/projects/get/web/${id}`, {
cache: "no-store",
headers: {
Authorization: token ? `Bearer ${token}` : "",
},
});
if (!response.ok) return null;
const data = await response.json();
return data?.project ?? null;
} catch {
return null;
}
}