Skip to content

Commit

Permalink
kick people
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahuletto committed Oct 23, 2024
1 parent db17118 commit 9018737
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions provider/DataProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import { Cookie as cookies, getCookie } from "@/utils/Cookies";
import { Cookie, Cookie as cookies, getCookie } from "@/utils/Cookies";
import { type ReactNode, createContext, useContext } from "react";
import useSWR from "swr";
import Storage from "@/utils/Storage";
Expand Down Expand Up @@ -40,7 +40,10 @@ const DataContext = createContext<DataContextType>({
const fetcher = async (url: string) => {
const cookie = cookies.get("key");
if (!cookie) return null;


if(cookie?.length < 800) {
Cookie.clear();
}
const response = await fetch(url, {
method: "GET",
headers: {
Expand Down
1 change: 0 additions & 1 deletion types/Response.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { AttendanceCourse } from "./Attendance";
import { Calendar, Day } from "./Calendar";
import { Course } from "./Course";
import { DayOrderResponse } from "./DayOrder";
import { Mark } from "./Marks";
import { SuccessTimeTableResponse } from "./Timetable";
import { User } from "./User";
Expand Down

0 comments on commit 9018737

Please sign in to comment.