1 import { useTranslation } from "react-i18next"
2 import { StatusCell } from "../../common/status-cell"
3
4 type AdminOnlyCellProps = {
5 adminOnly: boolean
6 }
7
8 export const AdminOnlyCell = ({ adminOnly }: AdminOnlyCellProps) => {
9 const { t } = useTranslation()
10
11 const color = adminOnly ? "blue" : "green"
12 const text = adminOnly ? t("general.admin") : t("general.store")
13
14 return <StatusCell color={color}>{text}</StatusCell>
15 }
16
17 export const AdminOnlyHeader = () => {
18 const { t } = useTranslation()
19
20 return (
21 <div className="flex items-center overflow-hidden">
22 <span className="truncate">{t("fields.availability")}</span>
23 </div>
24 )
25 }