Openstatus www.openstatus.dev

fix: favicon remove button (#1299)

* fix: favicon remove button

* fix: tsc

authored by

Maximilian Kaske and committed by
GitHub
ec07a472 ab17c980

+4 -3
+4 -3
apps/dashboard/src/components/forms/status-page/form-general.tsx
··· 91 91 const uploadMutation = useMutation(trpc.blob.upload.mutationOptions()); 92 92 const watchSlug = form.watch("slug"); 93 93 const watchTitle = form.watch("title"); 94 + const watchIcon = form.watch("icon"); 94 95 const debouncedSlug = useDebounce(watchSlug, 500); 95 96 const { data: isUnique } = useQuery( 96 97 trpc.page.getSlugUniqueness.queryOptions( ··· 197 198 <FormField 198 199 control={form.control} 199 200 name="icon" 200 - render={({ field }) => ( 201 + render={() => ( 201 202 <FormItem> 202 203 <FormLabel>Icon</FormLabel> 203 204 <FormControl> 204 205 <div className="flex items-center space-x-2"> 205 - {field.value ? ( 206 + {watchIcon ? ( 206 207 <> 207 208 <div className="size-[36px] overflow-hidden rounded-md border bg-muted"> 208 209 <Image 209 - src={field.value} 210 + src={watchIcon} 210 211 width={36} 211 212 height={36} 212 213 alt="Icon preview"