Add typecheck
This commit is contained in:
@@ -29,7 +29,13 @@ type Picture = {
|
||||
const { data, refresh, error } = await useFetch(`/api/hunt/${id}/diashow`, {
|
||||
transform: (input) => {
|
||||
if (!input || input.quests.length <= 0)
|
||||
return { id: 0, name: '', cols: [] as Picture[][], count: 0 };
|
||||
return {
|
||||
id: 0,
|
||||
name_de: '',
|
||||
name_en: '',
|
||||
cols: [] as Picture[][],
|
||||
count: 0
|
||||
};
|
||||
const { quests, ...rest } = input;
|
||||
const pictures: Picture[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user