超管后台 - 对接新建项目

This commit is contained in:
柳清爽
2025-04-15 17:00:25 +08:00
parent 00aa18951e
commit 4581ef5ee1
2 changed files with 6 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { ArrowLeft } from "lucide-react"
import Link from "next/link"
import { toast } from "sonner"
import { toast, Toaster } from "sonner"
export default function NewProjectPage() {
const router = useRouter()
@@ -67,10 +67,10 @@ export default function NewProjectPage() {
toast.success("创建成功")
router.push("/dashboard/projects")
} else {
toast.error(data.msg || "创建失败")
toast.error(data.msg)
}
} catch (error) {
toast.error("创建失败,请稍后重试")
toast.error("网络错误,请稍后重试")
} finally {
setIsSubmitting(false)
}
@@ -78,6 +78,7 @@ export default function NewProjectPage() {
return (
<div className="space-y-6">
<Toaster richColors position="top-center" />
<div className="flex items-center gap-2">
<Button variant="outline" size="icon" asChild>
<Link href="/dashboard/projects">