fix build error

This commit is contained in:
hamid zarghami
2025-12-23 09:49:29 +03:30
parent 8135de464d
commit 9f12eb3932
2 changed files with 8 additions and 12 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -11
View File
@@ -1,17 +1,14 @@
import { API_BASE_URL } from "@/config/const";
import { AboutResponse, Restaurant } from "./(Main)/about/types/Types";
import { AboutResponse, Restaurant } from "../(Main)/about/types/Types";
export async function getRestaurant(slug: string): Promise<Restaurant> {
try {
const response = await fetch(
`${API_BASE_URL}/public/restaurants/${slug}`,
{
cache: "no-store",
headers: {
"Content-Type": "application/json",
},
}
);
const response = await fetch(`${API_BASE_URL}/public/restaurants/${slug}`, {
cache: "no-store",
headers: {
"Content-Type": "application/json",
},
});
if (!response.ok) {
if (response.status === 404) {
@@ -34,4 +31,3 @@ export async function getRestaurant(slug: string): Promise<Restaurant> {
throw new Error(`Failed to fetch restaurant data: ${error}`);
}
}