check role for settings when in mum

This commit is contained in:
timothycarambat 2023-08-24 08:20:44 -07:00
parent 3274d5ab6b
commit a3d6d876c4

View File

@ -334,7 +334,8 @@ function LogoutButton() {
function SettingsButton({ onClick }) { function SettingsButton({ onClick }) {
const { user } = useUser(); const { user } = useUser();
if (!!user) return null;
if (!!user && user?.role !== "admin") return null;
return ( return (
<button <button
onClick={onClick} onClick={onClick}