Skip to content

Commit d1381a6

Browse files
committed
Fix Admin Route Bug
1 parent e18fd78 commit d1381a6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Frontend/src/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ const AIChatWrapper = () => {
4848

4949
const ChatWrapper = () => {
5050
const location = useLocation();
51-
return location.pathname === "/collaboration" ? <CommunicationWindow /> : null;
51+
return location.pathname === "/collaboration" ? (
52+
<CommunicationWindow />
53+
) : null;
5254
};
5355

5456
function App() {

Frontend/src/User/UserStateController.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ async function getUserAdminStatus() {
3737
const result = await getUserData(userId);
3838

3939
console.log(result.data.user.isAdmin);
40+
41+
return result.data.user.isAdmin;
4042
}
4143

4244
return false;

0 commit comments

Comments
 (0)