diff --git a/front/pages/s/[id].vue b/front/pages/s/[id].vue index 86c2370..45a001b 100644 --- a/front/pages/s/[id].vue +++ b/front/pages/s/[id].vue @@ -10,7 +10,7 @@ const route = useRoute() const router = useRouter() const id = computed(() => route.params.id) -const { data, isLoading } = useQuery({ +const { data, isLoading, error } = useQuery({ queryKey: ['share', id.value], queryFn: async () => { const data = await $fetch<{ @@ -18,10 +18,12 @@ const { data, isLoading } = useQuery({ data: { id?: string expire_at?: number + type?: string } }>(`/api/share/${id.value}`) return data?.data - } + }, + retry: false }) const isExpired = computed(() => { @@ -29,6 +31,11 @@ const isExpired = computed(() => { return !data || !expire_at || dayjs(expire_at * 10e2).isBefore(dayjs()) }) +const componentMap = { + file: FileShareView, + text: TextShareView +} +