fix: Remove car_id property from adminAddVehicle call to fix TypeScript error

This commit is contained in:
AutonetSellCar Deploy
2026-02-01 21:16:03 +09:00
parent 5881126408
commit b340d338ff
31 changed files with 7071 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
"use client";
import { useState } from "react";
import { useRouter } from "next/navigation";
import { useAuth } from "@/contexts/AuthContext";
import { solutionsApi } from "@/lib/api";
import SolutionForm from "@/components/admin/SolutionForm";
export default function NewSolutionPage() {
const { token } = useAuth();
const router = useRouter();
const [isSubmitting, setIsSubmitting] = useState(false);
const handleSubmit = async (data: any) => {
if (!token) return;
setIsSubmitting(true);
try {
const solution = await solutionsApi.adminCreate(data, token);
router.push(`/admin/solutions/${solution.id}`);
} catch (err) {
alert("솔루션 생성에 실패했습니다.");
} finally {
setIsSubmitting(false);
}
};
return (
<div>
<h1 className="text-2xl font-bold text-gray-900 mb-8"> </h1>
<SolutionForm onSubmit={handleSubmit} isSubmitting={isSubmitting} />
</div>
);
}