refactor: simplify camera capture dialog in Dashboard component
This commit is contained in:
parent
b954e3cb84
commit
8f15ad5971
@ -3,10 +3,6 @@ import { TodayAttendanceAlert } from '@/components/card/today-attendance-alert';
|
||||
import { CameraCapture } from '@/components/inputs';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, type ChartConfig } from '@/components/ui/chart';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
} from '@/components/ui/dialog';
|
||||
import { useCan } from '@/hooks/use-can';
|
||||
import { generateRandomColors } from '@/lib/utils';
|
||||
import { formatRupiah } from '@/lib/rupiah';
|
||||
@ -310,14 +306,12 @@ export default function Dashboard({
|
||||
onCheckOut={handleCheckOut}
|
||||
/>
|
||||
|
||||
<Dialog open={showCamera} onOpenChange={setShowCamera}>
|
||||
<DialogContent>
|
||||
<CameraCapture
|
||||
onCapture={handleCameraCapture}
|
||||
onClose={() => setShowCamera(false)}
|
||||
/>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
{showCamera && (
|
||||
<CameraCapture
|
||||
onCapture={handleCameraCapture}
|
||||
onClose={() => setShowCamera(false)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user