refactor(structure): move legacy import and remove lib leftovers
This commit is contained in:
@@ -5,11 +5,10 @@ import { useRouter } from "next/navigation"
|
||||
import type { ChangeEvent } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { toast } from "sonner"
|
||||
|
||||
import { importItems } from "@/actions/import.actions"
|
||||
import { SubmitButton } from "@/components/forms/submitButton"
|
||||
import { importItems } from "@/lib/actions/import.actions"
|
||||
import { type ImportFormType, importSchema } from "@/lib/schemas/import.schemas"
|
||||
import type { CategorySummary } from "@/lib/types"
|
||||
import { type ImportFormType, importSchema } from "@/schemas/import.schema"
|
||||
import type { CategorySummary } from "@/types"
|
||||
|
||||
export default function ImportForm({
|
||||
categories,
|
||||
|
||||
@@ -15,7 +15,7 @@ export default async function ImportPage() {
|
||||
<h1 className="text-2xl font-bold">Mass Import</h1>
|
||||
</div>
|
||||
<div className="flex items-center justify-end gap-4">
|
||||
{ENVIRONMENT === "demo" && (
|
||||
{(ENVIRONMENT === "development" || ENVIRONMENT === "demo") && (
|
||||
<Link href="/sample_data.csv" download>
|
||||
<Button variant="outline">
|
||||
<Download />
|
||||
|
||||
Reference in New Issue
Block a user