Skip to content

Commit 60e1896

Browse files
committed
BIG FIX HASAN
1 parent 5a6094d commit 60e1896

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

frontend/src/components/Courses/AddCourse.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const AddCourse = ({ isOpen, onClose }: AddCourseProps) => {
158158
/>
159159
{errors.lectures?.[index]?.title && (
160160
<FormErrorMessage>
161-
{errors.lectures[index].title?.message}
161+
{errors.lectures?.[index]?.title?.message}
162162
</FormErrorMessage>
163163
)}
164164
</FormControl>

frontend/src/hooks/useAuth.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
1+
import { useMutation, useQuery /*,useQueryClient*/ } from "@tanstack/react-query"
22
import { useNavigate } from "@tanstack/react-router"
33
import { useState } from "react"
44

@@ -11,7 +11,7 @@ import {
1111
// type UserRegister,
1212
UsersService,
1313
} from "../client"
14-
import useCustomToast from "./useCustomToast"
14+
// import useCustomToast from "./useCustomToast"
1515

1616
const isLoggedIn = () => {
1717
return localStorage.getItem("access_token") !== null
@@ -20,8 +20,8 @@ const isLoggedIn = () => {
2020
const useAuth = () => {
2121
const [error, setError] = useState<string | null>(null)
2222
const navigate = useNavigate()
23-
const showToast = useCustomToast()
24-
const queryClient = useQueryClient()
23+
// const showToast = useCustomToast()
24+
// const queryClient = useQueryClient()
2525
const { data: user, isLoading } = useQuery<UserPublic | null, Error>({
2626
queryKey: ["currentUser"],
2727
queryFn: UsersService.readUserMe,

frontend/src/routes/_layout/admin.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function UsersTable() {
5050
const { page } = Route.useSearch()
5151
const navigate = useNavigate({ from: Route.fullPath })
5252
const setPage = (page: number) =>
53-
navigate({ search: (prev) => ({ ...prev, page }) })
53+
navigate({ search: (prev: any) => ({ ...prev, page }) })
5454

5555
const {
5656
data: users,

frontend/src/routes/_layout/courses.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function PostsTable() {
5050
const { page } = Route.useSearch();
5151
const navigate = useNavigate({ from: Route.fullPath });
5252
const setPage = (page: number) =>
53-
navigate({ search: (prev) => ({ ...prev, page }) });
53+
navigate({ search: (prev: any) => ({ ...prev, page }) });
5454

5555
const [expandedPostId, setExpandedPostId] = useState<number | null>(null);
5656
const {

frontend/src/routes/_layout/events.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function EventsTable() {
4646
const { page } = Route.useSearch()
4747
const navigate = useNavigate({ from: Route.fullPath })
4848
const setPage = (page: number) =>
49-
navigate({ search: (prev) => ({ ...prev, page }) })
49+
navigate({ search: (prev: any) => ({ ...prev, page }) })
5050

5151
const {
5252
data: events,

frontend/src/routes/_layout/posts.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function PostsTable() {
4646
const { page } = Route.useSearch()
4747
const navigate = useNavigate({ from: Route.fullPath })
4848
const setPage = (page: number) =>
49-
navigate({ search: (prev) => ({ ...prev, page }) })
49+
navigate({ search: (prev: any) => ({ ...prev, page }) })
5050

5151
const {
5252
data: posts,

frontend/src/routes/login.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
InputGroup,
1111
InputRightElement,
1212
Link,
13-
Text,
13+
// Text,
1414
useBoolean,
1515
} from "@chakra-ui/react"
1616
import {

0 commit comments

Comments
 (0)