'use client' import { useState, useTransition } from 'react' import { toast } from 'sonner' import { Button } from '@/components/ui/button' import { DemoTooltip } from '@/components/shared/demo-tooltip' import { updateMinQuotaPctAction } from '@/actions/settings' import { debugProps } from '@/lib/debug' interface MinQuotaEditorProps { currentValue: number isDemo: boolean } export function MinQuotaEditor({ currentValue, isDemo }: MinQuotaEditorProps) { const [value, setValue] = useState(currentValue) const [isPending, startTransition] = useTransition() function handleSave() { startTransition(async () => { const result = await updateMinQuotaPctAction(value) if ('error' in result) { toast.error(result.error as string) } else { toast.success('Instelling opgeslagen') } }) } return (

Worker slaapt tot quota gereset is wanneer onder deze drempel.

setValue(Number(e.target.value))} disabled={isDemo || isPending} className="w-24 rounded border border-border bg-surface-container px-3 py-1.5 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-primary disabled:opacity-50" data-debug-id="min-quota-editor__input" /> %
) }