Upload folder using huggingface_hub
Browse files
client/src/components/Layout.tsx
CHANGED
|
@@ -174,8 +174,8 @@ const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
| 174 |
navigation = navigation.filter(item => item.name !== 'Slides');
|
| 175 |
}
|
| 176 |
|
| 177 |
-
// Add Manage link for admin users
|
| 178 |
-
if (user?.role === 'admin') {
|
| 179 |
navigation.push({ name: 'Manage', href: '/manage', icon: Cog6ToothIcon });
|
| 180 |
}
|
| 181 |
|
|
@@ -202,7 +202,17 @@ const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
| 202 |
<img src="/favicon-512x512.png" alt="logo" className="h-8 w-8 mr-2" />
|
| 203 |
TransHub
|
| 204 |
</Link>
|
| 205 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
</div>
|
| 207 |
</header>
|
| 208 |
|
|
|
|
| 174 |
navigation = navigation.filter(item => item.name !== 'Slides');
|
| 175 |
}
|
| 176 |
|
| 177 |
+
// Add Manage link for admin users (hide in student view, per toggle)
|
| 178 |
+
if (user?.role === 'admin' && effectiveRole !== 'student') {
|
| 179 |
navigation.push({ name: 'Manage', href: '/manage', icon: Cog6ToothIcon });
|
| 180 |
}
|
| 181 |
|
|
|
|
| 202 |
<img src="/favicon-512x512.png" alt="logo" className="h-8 w-8 mr-2" />
|
| 203 |
TransHub
|
| 204 |
</Link>
|
| 205 |
+
<div>
|
| 206 |
+
{user?.role === 'admin' && effectiveRole === 'student' && (
|
| 207 |
+
<Link
|
| 208 |
+
to="/manage"
|
| 209 |
+
className="inline-flex items-center px-3 py-1.5 rounded-md text-sm font-medium text-ui-text bg-white/60 hover:bg-white/80 ring-1 ring-inset ring-ui-border"
|
| 210 |
+
title="Open Manage while in Student view"
|
| 211 |
+
>
|
| 212 |
+
Manage
|
| 213 |
+
</Link>
|
| 214 |
+
)}
|
| 215 |
+
</div>
|
| 216 |
</div>
|
| 217 |
</header>
|
| 218 |
|