mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
chore: refactor frontend components folder
This commit is contained in:
parent
46f016f661
commit
5a746a946d
106 changed files with 159 additions and 164 deletions
14
apps/web/components/Objects/ContentPlaceHolder.tsx
Normal file
14
apps/web/components/Objects/ContentPlaceHolder.tsx
Normal 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 (
|
||||
<span>{isUserAdmin ? text : 'No content yet'}</span>
|
||||
)
|
||||
}
|
||||
|
||||
export default ContentPlaceHolderIfUserIsNotAdmin
|
||||
Loading…
Add table
Add a link
Reference in a new issue