Skip to content

Commit a207123

Browse files
authored
fix: various runtime errors (#2168)
2 parents 0a67eff + 8cce732 commit a207123

File tree

4 files changed

+7
-20
lines changed

4 files changed

+7
-20
lines changed

frontend/src/app/_components/LandingHero/Organizations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { Swiper, SwiperSlide } from "swiper/react";
99
import { Organization, OrganizationLink } from "./OrganizationLink";
1010

1111
const organizations: Readonly<Organization[]> = [
12-
{ name: "Janus", internalUrl: "/janus/info" },
12+
{ name: "Janus", internalUrl: "/about" },
1313
{ name: "Bindeleddet", externalUrl: "https://www.bindeleddet.no" },
1414
{ name: "ESTIEM", externalUrl: "https://sites.google.com/view/estiem-ntnu" },
1515
{ name: "Janus Kultur", internalUrl: "/about/organization?category=kultur" },
1616
{ name: "Rubberdøk", internalUrl: "/about/organizations/rubberdok" },
17-
{ name: "Janushyttene", internalUrl: "/about/organizations/Janushyttene" },
17+
{ name: "Janushyttene", internalUrl: "/about/organizations/hytteforeningen" },
1818
{ name: "Janus IF", internalUrl: "/about/organization?category=idrett" },
1919
] as const;
2020

frontend/src/components/Markdown/components.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
import {
2-
Box,
3-
Card,
4-
CardContent,
5-
Divider,
6-
List,
7-
ListItemText,
8-
ListItem as MuiListItem,
9-
Typography,
10-
} from "@mui/material";
1+
import { Card, CardContent, Divider, List, ListItemText, ListItem as MuiListItem, Typography } from "@mui/material";
112
import { listItemClasses } from "@mui/material/ListItem";
123
import { styled } from "@mui/material/styles";
134
import { typographyClasses } from "@mui/material/Typography";
@@ -64,11 +55,7 @@ const H6: Components["h2"] = ({ children, id }) => {
6455
};
6556

6657
const Image: Components["img"] = (props) => {
67-
return (
68-
<Box maxWidth="100%" height="auto">
69-
<img {...props} style={{ objectFit: "contain" }} width="100%" />
70-
</Box>
71-
);
58+
return <img {...props} style={{ objectFit: "contain" }} width="100%" />;
7259
};
7360

7461
const UnorderedList: Components["ul"] = ({ children }) => {

frontend/src/layouts/navigation/variants/Basic/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Basic: React.FC<NavigationProps> = ({ routes }) => {
1818
{routes.map((route) => {
1919
if (route.permission)
2020
return (
21-
<PermissionRequired permission={route.permission} key={route.title} optimistic>
21+
<PermissionRequired permission={route.permission} key={route.title}>
2222
<NavigationLink route={route} active={pathname.includes(route.path)} />
2323
</PermissionRequired>
2424
);

frontend/src/layouts/navigation/variants/Drawer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Menu } from "@mui/icons-material";
2-
import { Box, Divider, Drawer as MuiDrawer, IconButton, Stack } from "@mui/material";
2+
import { Box, Divider, IconButton, Drawer as MuiDrawer, Stack } from "@mui/material";
33
import { useRouter } from "next/router";
44
import { useState } from "react";
55

@@ -42,7 +42,7 @@ export const Drawer: React.FC<NavigationProps> = ({ routes }) => {
4242
{routes.map((route) => {
4343
if (route.permission) {
4444
return (
45-
<PermissionRequired permission={route.permission} key={route.title} optimistic>
45+
<PermissionRequired permission={route.permission} key={route.title}>
4646
<NavigationLink route={route} active={pathname.includes(route.path)} />
4747
</PermissionRequired>
4848
);

0 commit comments

Comments
 (0)