proje kontrol ve hata düzeltme
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { useForm, type Resolver } from "react-hook-form"
|
||||
import { zodResolver } from "@hookform/resolvers/zod"
|
||||
import * as z from "zod"
|
||||
import { Button } from "@/components/ui/button"
|
||||
@@ -54,7 +54,7 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
const form = useForm<SliderFormValues>({
|
||||
resolver: zodResolver(sliderSchema),
|
||||
resolver: zodResolver(sliderSchema) as Resolver<SliderFormValues>,
|
||||
defaultValues: initialData ? {
|
||||
title: initialData.title,
|
||||
description: initialData.description || "",
|
||||
@@ -107,7 +107,6 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="image_url"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
@@ -127,7 +126,6 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="title"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
@@ -141,7 +139,6 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="order"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
@@ -157,7 +154,6 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
</div>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="description"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
@@ -171,7 +167,6 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="link"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
@@ -185,7 +180,6 @@ export function SliderForm({ initialData }: SliderFormProps) {
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="is_active"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex flex-row items-start space-x-3 space-y-0 rounded-md border p-4">
|
||||
|
||||
4
lint_errors.txt
Normal file
4
lint_errors.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
> parakasa@0.1.0 lint
|
||||
> next lint
|
||||
|
||||
BIN
lint_report.txt
Normal file
BIN
lint_report.txt
Normal file
Binary file not shown.
5
lint_results.txt
Normal file
5
lint_results.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
> parakasa@0.1.0 lint
|
||||
> next lint
|
||||
|
||||
✔ No ESLint warnings or errors
|
||||
BIN
tsc_err.txt
Normal file
BIN
tsc_err.txt
Normal file
Binary file not shown.
BIN
tsc_output.txt
Normal file
BIN
tsc_output.txt
Normal file
Binary file not shown.
Reference in New Issue
Block a user