refactor: add sample data download link for non-production environments
This commit is contained in:
@@ -2,6 +2,7 @@ import { Download } from "lucide-react"
|
|||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
|
import { ENVIRONMENT } from "@/lib/constants"
|
||||||
import { CategoryService } from "@/services/category.service"
|
import { CategoryService } from "@/services/category.service"
|
||||||
|
|
||||||
import ImportForm from "./_components/import.form"
|
import ImportForm from "./_components/import.form"
|
||||||
@@ -14,10 +15,18 @@ export default async function ImportPage() {
|
|||||||
<h1 className="text-2xl font-bold">Mass Import</h1>
|
<h1 className="text-2xl font-bold">Mass Import</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-end gap-4">
|
<div className="flex items-center justify-end gap-4">
|
||||||
|
{ENVIRONMENT !== "production" && (
|
||||||
|
<Link href="/sample_data.csv" download>
|
||||||
|
<Button variant="outline">
|
||||||
|
<Download />
|
||||||
|
Sample Data
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<Link href="/template.csv" download>
|
<Link href="/template.csv" download>
|
||||||
<Button variant="outline">
|
<Button variant="outline">
|
||||||
<Download />
|
<Download />
|
||||||
Download Template
|
Template
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user