mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
feat: split into multiple items
This commit is contained in:
@@ -1,19 +1,35 @@
|
||||
"use client"
|
||||
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Swords } from "lucide-react"
|
||||
import { Save, Swords } from "lucide-react"
|
||||
|
||||
export function AnalyzeAllButton() {
|
||||
const handleAnalyzeAll = () => {
|
||||
document.querySelectorAll("button[data-analyze-button]").forEach((button) => {
|
||||
;(button as HTMLButtonElement).click()
|
||||
})
|
||||
if (typeof document !== "undefined") {
|
||||
document.querySelectorAll("button[data-analyze-button]").forEach((button) => {
|
||||
;(button as HTMLButtonElement).click()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const handleSaveAll = () => {
|
||||
if (typeof document !== "undefined") {
|
||||
document.querySelectorAll("button[data-save-button]").forEach((button) => {
|
||||
;(button as HTMLButtonElement).click()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Button variant="outline" className="flex items-center gap-2" onClick={handleAnalyzeAll}>
|
||||
<Swords className="h-4 w-4" />
|
||||
Analyze all
|
||||
</Button>
|
||||
<div className="flex flex-row gap-2">
|
||||
<Button variant="outline" className="flex items-center gap-2" onClick={handleSaveAll}>
|
||||
<Save className="h-4 w-4" />
|
||||
Save all
|
||||
</Button>
|
||||
<Button className="flex items-center gap-2" onClick={handleAnalyzeAll}>
|
||||
<Swords className="h-4 w-4" />
|
||||
Analyze all
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user