Skip to content

Commit 1f9a1a3

Browse files
committed
fix: fixing the title to its name
1 parent 74c3aa3 commit 1f9a1a3

File tree

1 file changed

+5
-34
lines changed
  • app/dashboard/panitia/panitiadivisi

1 file changed

+5
-34
lines changed

app/dashboard/panitia/panitiadivisi/page.tsx

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@
22
import MUIDataTable, { MUIDataTableColumn } from "mui-datatables";
33
import { useState, useEffect } from "react";
44
import { ThemeProvider } from "@mui/material/styles";
5-
import {
6-
Box,
7-
Flex,
8-
Text,
9-
Divider,
10-
HStack,
11-
Switch,
12-
Link,
13-
Select,
14-
Image,
15-
Button,
16-
SkeletonText,
17-
} from "@chakra-ui/react";
5+
import { Box, Flex, Text, Divider, HStack, Switch, Link, Select, Image, Button, SkeletonText } from "@chakra-ui/react";
186
import { createTheme } from "@mui/material/styles";
197
import Layout from "@/components/Layout";
208
import api, { ResponseModel, HandleAxiosError } from "@/services/api";
@@ -71,23 +59,15 @@ export default function PanitiaDivisi() {
7159

7260
useEffect(() => {
7361
if (!auth.loading && auth.role !== "panit") {
74-
Swal.fire(
75-
"Error!",
76-
"Maaf, anda tidak memiliki akses ke page ini",
77-
"error"
78-
);
62+
Swal.fire("Error!", "Maaf, anda tidak memiliki akses ke page ini", "error");
7963
route.push("/dashboard");
8064
return;
8165
}
8266

8367
const loadDataPanit = async () => {
8468
try {
8569
const { data } = await api.get<ResponseModel<Panitia[]>>(`panit/data`);
86-
setDataPanitia(
87-
data.data!.filter(
88-
(panitia) => panitia.divisiID === auth.user?.divisiID
89-
)
90-
);
70+
setDataPanitia(data.data!.filter((panitia) => panitia.divisiID === auth.user?.divisiID));
9171
} catch (error) {
9272
console.log(error);
9373
HandleAxiosError(error);
@@ -100,18 +80,9 @@ export default function PanitiaDivisi() {
10080
return (
10181
<>
10282
<title>MAXIMA 2023 Internal - Organisator</title>
103-
<Layout
104-
title="Organisator"
105-
tag={auth.user?.divisiName}
106-
showDashboardButton
107-
>
83+
<Layout title={"Panitia Divisi"} tag={auth.user?.divisiName} showDashboardButton>
10884
<Box w={"full"}>
109-
<SkeletonText
110-
isLoaded={!fetchLoading}
111-
noOfLines={10}
112-
spacing={8}
113-
skeletonHeight={12}
114-
>
85+
<SkeletonText isLoaded={!fetchLoading} noOfLines={10} spacing={8} skeletonHeight={12}>
11586
<ThemeProvider theme={createTheme()}>
11687
<MUIDataTable
11788
title={""}

0 commit comments

Comments
 (0)