Skip to content

Commit 3b241fc

Browse files
committed
linting
1 parent 28675ac commit 3b241fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+999
-538
lines changed

frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const App = (): React.ReactElement => {
8080
const theme = extendTheme({
8181
colors,
8282
textStyles,
83-
components: {
83+
components: {
8484
Text,
8585
Progress,
8686
Checkbox,

frontend/src/admin/AdminContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ interface AdminProviderProps {
2020

2121
export const AdminProvider: React.FC<AdminProviderProps> = ({ children }) => {
2222
const [role, setRole] = useState<string>("");
23-
const [roomToParticipant, setRoomToParticipant] = useState<Record<number, number>>({});
23+
const [roomToParticipant, setRoomToParticipant] = useState<
24+
Record<number, number>
25+
>({});
2426

2527
return (
2628
<AdminContext.Provider

frontend/src/admin/AdminMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default function AdminMenu() {
7474
{ label: "Participants", route: ROUTES.ADMIN_PARTICIPANTS_PAGE },
7575
{ label: "Task Library", route: ROUTES.ADMIN_TASKS_PAGE },
7676
{ label: "Badge Library", route: ROUTES.ADMIN_BADGES_PAGE },
77-
77+
7878
...(role === ADMIN
7979
? [{ label: "Reports", route: ROUTES.ADMIN_REPORTS_PAGE }]
8080
: []),

frontend/src/admin/AdminRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function AdminRoute({ children }: AdminRouteProps) {
6565
adminContext.setRole(role);
6666
}
6767
setPopulatingContext(false);
68-
}
68+
};
6969
populateContext();
7070
}
7171
}, [authorizing, authorized]);

frontend/src/admin/pages/announcements/components/AnnouncementCard.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function AnnouncementCard({
3636
await deleteAnnouncement({
3737
variables: { aid },
3838
});
39-
39+
4040
refetch();
4141
sendNotification("Announcement deleted successfully");
4242
} catch (err: any) {
@@ -55,21 +55,15 @@ export default function AnnouncementCard({
5555
<Flex direction="row" justify="space-between" align="center" gap="20px">
5656
<Flex direction="column" flex="1">
5757
<Flex align="center" gap={1.5}>
58-
<Text textStyle="s1">
59-
{room}
60-
</Text>
58+
<Text textStyle="s1">{room}</Text>
6159
<Flex>
62-
{(priority === Priority.HIGH || priority === Priority.CRITICAL) && <ExclamationMark />}
60+
{(priority === Priority.HIGH ||
61+
priority === Priority.CRITICAL) && <ExclamationMark />}
6362
{priority === Priority.CRITICAL && <ExclamationMark />}
6463
</Flex>
6564
</Flex>
6665

67-
<Text
68-
textStyle="b1"
69-
mt={1}
70-
whiteSpace="pre-line"
71-
color="text.dark"
72-
>
66+
<Text textStyle="b1" mt={1} whiteSpace="pre-line" color="text.dark">
7367
{message}
7468
</Text>
7569

frontend/src/admin/pages/announcements/components/CreateAnnouncementModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ const CreateAnnouncementModal = ({
3232
const { roomToParticipant } = useContext(AdminContext);
3333

3434
const handleSend = async () => {
35-
if (selectedRooms.length === 0 || priority === null || message === "" || topic === "") {
35+
if (
36+
selectedRooms.length === 0 ||
37+
priority === null ||
38+
message === "" ||
39+
topic === ""
40+
) {
3641
setError("Missing fields.");
3742
return;
3843
}

frontend/src/admin/pages/badges/components/AssignCustomBadgeModal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ const AssignCustomBadgeModal: React.FC<AssignCustomBadgeModalProps> = ({
130130

131131
<Flex w="100%" h="1px" bg="background.border" mt="6px" />
132132

133-
<Text textStyle="s2">
134-
Choose Room(s)
135-
</Text>
133+
<Text textStyle="s2">Choose Room(s)</Text>
136134
<Grid templateColumns="repeat(5, 1fr)" gap="5px">
137135
{ROOM_NUMBERS.map((num: number) => (
138136
<GreenOutlineButton

frontend/src/admin/pages/badges/components/CreateCustomBadgeModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ const CreateCustomBadgeModal = ({
9797
py="12px"
9898
px="8px"
9999
border="1px solid"
100-
borderColor={isSelected ? "brand.primaryDark" : "background.border"}
100+
borderColor={
101+
isSelected ? "brand.primaryDark" : "background.border"
102+
}
101103
borderRadius="8px"
102104
cursor="pointer"
103105
onClick={() => setSelectedIcon(icon)}

frontend/src/admin/pages/badges/components/CustomBadgeTable.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ const CustomBadgeTable = ({
5252
{ header: "Badge Name", width: "25%" },
5353
{ header: "Description", width: "68%" },
5454

55-
...(role === ADMIN ? [
56-
{ header: "", width: "1%" },
57-
{ header: "", width: "1%" },
58-
] : []),
55+
...(role === ADMIN
56+
? [
57+
{ header: "", width: "1%" },
58+
{ header: "", width: "1%" },
59+
]
60+
: []),
5961
];
6062

6163
const rows: Row[][] = badges.length
@@ -66,19 +68,21 @@ const CustomBadgeTable = ({
6668
{ element: badge.name },
6769
{ element: badge.description },
6870

69-
...(role === ADMIN ? [
70-
{
71-
element: <Marker size={20} />,
72-
action: () => {
73-
setSelected(badge);
74-
setEdit(true);
75-
},
76-
},
77-
{
78-
element: <Trash size={20} />,
79-
action: async () => handleDelete(badge.cid),
80-
},
81-
] : []),
71+
...(role === ADMIN
72+
? [
73+
{
74+
element: <Marker size={20} />,
75+
action: () => {
76+
setSelected(badge);
77+
setEdit(true);
78+
},
79+
},
80+
{
81+
element: <Trash size={20} />,
82+
action: async () => handleDelete(badge.cid),
83+
},
84+
]
85+
: []),
8286
];
8387
})
8488
: [];

frontend/src/admin/pages/badges/components/EditSystemBadgeModal.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,7 @@ const EditSystemBadgeModal = ({
164164

165165
<Flex justifyContent="space-between" alignItems="center" w="100%">
166166
<Flex flexDir="column" gap="5px">
167-
<Text textStyle="s2">
168-
Set Badge Levels
169-
</Text>
167+
<Text textStyle="s2">Set Badge Levels</Text>
170168
{LEVEL_ORDER.map((level: Level) => {
171169
if (!badgeLevels[level]) return null;
172170
const data = badgeLevels[level];
@@ -199,10 +197,7 @@ const EditSystemBadgeModal = ({
199197
})}
200198
</Flex>
201199
<Flex flexDir="column" gap="5px">
202-
<Text
203-
textStyle="s2"
204-
textAlign="right"
205-
>
200+
<Text textStyle="s2" textAlign="right">
206201
Marillac Bucks
207202
</Text>
208203
{LEVEL_ORDER.map((level: Level) => {

0 commit comments

Comments
 (0)