flnxi-Wu/app/edit/[id]/page.tsx
WuYongJie d1c6efc79d
Some checks failed
CI Check / check (push) Has been cancelled
feat: NAS 部署与 Harbor 推送流程
2025-12-03 14:39:06 +08:00

28 lines
707 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* EditMaterialPage 组件
*
* 素材编辑页面 - 已废弃,重定向到首页编辑弹窗
*
* @deprecated 此页面已废弃,编辑功能现在使用首页的EditMaterialModal弹窗
*/
'use client'
import { useEffect } from 'react'
import { useSession } from 'next-auth/react'
import { useRouter } from 'next/navigation'
export default function EditMaterialPage({ params }: { params: { id: string } }) {
const { data: session, status } = useSession()
const router = useRouter()
useEffect(() => {
// 重定向到首页,并传递编辑参数
if (status !== 'loading') {
router.replace(`/?edit=${params.id}`)
}
}, [status, params.id, router])
return null
}