refactor(structure): move legacy import and remove lib leftovers

This commit is contained in:
2026-06-04 22:13:26 +02:00
parent da9ae0582b
commit a7f7ace527
17 changed files with 27 additions and 220 deletions
@@ -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,
+1 -1
View File
@@ -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 />