|
@@ -15,8 +15,8 @@ const getGames = async (): Promise<GroupType[]> => {
|
|
|
const data = await fetch(`${BASE_URL}/v1/api/front/game_list`, {
|
|
|
method: "POST",
|
|
|
body: JSON.stringify({}),
|
|
|
- }).then((res) => res.json());
|
|
|
- return data.data;
|
|
|
+ }).then((res) => res.json()).catch((err) => console.error(err));
|
|
|
+ return data?.data || [];
|
|
|
};
|
|
|
export default async function Page() {
|
|
|
const group: GroupType[] = await getGames();
|