fix: Header Role Indicator + Disable course creation wording if user isn't connected

This commit is contained in:
swve 2024-03-19 22:34:28 +01:00
parent a124cde229
commit 7398e9e946
9 changed files with 85 additions and 169 deletions

View file

@ -0,0 +1,14 @@
'use client';
import React from 'react'
import useAdminStatus from './Hooks/useAdminStatus'
// Terrible name and terible implementation, need to be refactored asap
function ContentPlaceHolderIfUserIsNotAdmin({ text }: { text: string }) {
const isUserAdmin = useAdminStatus() as any
return (
<div>{isUserAdmin ? text : 'No content yet'}</div>
)
}
export default ContentPlaceHolderIfUserIsNotAdmin