This commit is contained in:
rgrgogu
2026-05-06 19:04:04 +08:00
parent f165e8b3bb
commit 95f838376e
19 changed files with 1035 additions and 87 deletions
+1 -8
View File
@@ -1,17 +1,10 @@
import { useNavigate } from 'react-router-dom'
import { useAuth } from '@/contexts/AuthContext'
export default function NotFound() {
const { user } = useAuth()
const navigate = useNavigate()
const goHome = () => {
switch (user?.acc_type) {
case 'admin': navigate('/admin'); break
case 'client': navigate('/client'); break
case 'staff': navigate('/staff'); break
default: navigate(-1)
}
navigate(-1)
}
return (
+1 -8
View File
@@ -1,17 +1,10 @@
import { useNavigate } from 'react-router-dom'
import { useAuth } from '@/contexts/AuthContext'
export default function Unauthorized() {
const { user } = useAuth()
const navigate = useNavigate()
const goHome = () => {
switch (user?.acc_type) {
case 'admin': navigate('/admin'); break
case 'client': navigate('/client'); break
case 'staff': navigate('/staff'); break
default: navigate(-1)
}
navigate(-1)
}
return (