Remove dashboard document management link
This commit is contained in:
parent
17b0f06037
commit
d4ef94a117
1 changed files with 1 additions and 8 deletions
|
|
@ -13,7 +13,6 @@ function greeting(name) {
|
|||
|
||||
export default function DashboardPage() {
|
||||
const { user } = useAuth()
|
||||
const isModerator = user?.role === 'admin' || user?.role === 'moderator'
|
||||
const [stats, setStats] = useState(null)
|
||||
const [history, setHistory] = useState([])
|
||||
const [selectedQuizId, setSelectedQuizId] = useState(null)
|
||||
|
|
@ -47,7 +46,7 @@ export default function DashboardPage() {
|
|||
if (histRes.data.length > 0) setSelectedQuizId(histRes.data[0].quiz_id)
|
||||
}).catch(console.error)
|
||||
.finally(() => setLoading(false))
|
||||
}, [isModerator])
|
||||
}, [])
|
||||
|
||||
if (loading) return <div className="loading"><div className="spinner"></div> Loading...</div>
|
||||
|
||||
|
|
@ -153,12 +152,6 @@ export default function DashboardPage() {
|
|||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isModerator && (
|
||||
<div style={{ textAlign: 'center', marginTop: 8 }}>
|
||||
<Link to="/upload" className="btn btn-secondary">Manage Documents</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue