Ver código fonte

refactor(dashboard): Make AlertItem props readonly for better immutability

David Höck 9 meses atrás
pai
commit
25d56012f7

+ 1 - 1
packages/dashboard/src/lib/framework/alert/alert-item.tsx

@@ -7,7 +7,7 @@ interface AlertItemProps extends ComponentProps<'div'> {
     alert: DashboardAlertDefinition;
     alert: DashboardAlertDefinition;
 }
 }
 
 
-export function AlertItem({ alert, className, ...props }: AlertItemProps) {
+export function AlertItem({ alert, className, ...props }: Readonly<AlertItemProps>) {
     const { data } = useQuery({
     const { data } = useQuery({
         queryKey: ['alert', alert.id],
         queryKey: ['alert', alert.id],
         queryFn: () => alert.check(),
         queryFn: () => alert.check(),