mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
14 lines
No EOL
421 B
TypeScript
14 lines
No EOL
421 B
TypeScript
'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 |