fix build error
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user