diff --git a/apps/web/.eslintrc b/apps/web/.eslintrc index af133940..e562b59a 100644 --- a/apps/web/.eslintrc +++ b/apps/web/.eslintrc @@ -3,6 +3,8 @@ "rules": { "react/no-unescaped-entities": "off", "@next/next/no-page-custom-font": "off", - "@next/next/no-img-element": "off" - } + "@next/next/no-img-element": "off", + "unused-imports/no-unused-imports": "warn" + }, + "plugins": ["unused-imports"] } diff --git a/apps/web/app/editor/course/[courseid]/activity/[activityuuid]/edit/page.tsx b/apps/web/app/editor/course/[courseid]/activity/[activityuuid]/edit/page.tsx index f648cd84..14aa9953 100644 --- a/apps/web/app/editor/course/[courseid]/activity/[activityuuid]/edit/page.tsx +++ b/apps/web/app/editor/course/[courseid]/activity/[activityuuid]/edit/page.tsx @@ -4,11 +4,10 @@ import { getCourseMetadataWithAuthHeader } from "@services/courses/courses"; import { cookies } from "next/headers"; import { Metadata } from "next"; import { getActivityWithAuthHeader } from "@services/courses/activities"; -import { getAccessTokenFromRefreshTokenCookie, getNewAccessTokenUsingRefreshTokenServer } from "@services/auth/auth"; -import { getOrganizationContextInfo, getOrganizationContextInfoWithId } from "@services/organizations/orgs"; +import { getAccessTokenFromRefreshTokenCookie } from "@services/auth/auth"; +import { getOrganizationContextInfoWithId } from "@services/organizations/orgs"; import SessionProvider from "@components/Contexts/SessionContext"; import EditorOptionsProvider from "@components/Contexts/Editor/EditorContext"; -import AIChatBotProvider from "@components/Contexts/AI/AIChatBotContext"; import AIEditorProvider from "@components/Contexts/AI/AIEditorContext"; type MetadataProps = { diff --git a/apps/web/app/install/steps/account_creation.tsx b/apps/web/app/install/steps/account_creation.tsx index ca2a053d..db7fb1fd 100644 --- a/apps/web/app/install/steps/account_creation.tsx +++ b/apps/web/app/install/steps/account_creation.tsx @@ -1,5 +1,5 @@ "use client"; -import FormLayout, { ButtonBlack, FormField, FormLabel, FormLabelAndMessage, FormMessage, Input } from '@components/StyledElements/Form/Form' +import FormLayout, { ButtonBlack, FormField, FormLabelAndMessage, Input } from '@components/StyledElements/Form/Form' import * as Form from '@radix-ui/react-form'; import { getAPIUrl } from '@services/config/config'; import { createNewUserInstall, updateInstall } from '@services/install/install'; @@ -8,7 +8,7 @@ import { useFormik } from 'formik'; import { useRouter } from 'next/navigation'; import React from 'react' import { BarLoader } from 'react-spinners'; -import useSWR, { mutate } from "swr"; +import useSWR from "swr"; const validate = (values: any) => { const errors: any = {}; diff --git a/apps/web/app/install/steps/get_started.tsx b/apps/web/app/install/steps/get_started.tsx index f57a9931..91691249 100644 --- a/apps/web/app/install/steps/get_started.tsx +++ b/apps/web/app/install/steps/get_started.tsx @@ -2,7 +2,7 @@ import PageLoading from '@components/Objects/Loaders/PageLoading'; import { getAPIUrl } from '@services/config/config'; import { swrFetcher } from '@services/utils/ts/requests'; import { useRouter } from 'next/navigation'; -import React, { use, useEffect } from 'react' +import React, { useEffect } from 'react' import useSWR, { mutate } from "swr"; function GetStarted() { diff --git a/apps/web/app/install/steps/org_creation.tsx b/apps/web/app/install/steps/org_creation.tsx index 88b60c89..0fbd3996 100644 --- a/apps/web/app/install/steps/org_creation.tsx +++ b/apps/web/app/install/steps/org_creation.tsx @@ -1,13 +1,12 @@ -import FormLayout, { ButtonBlack, FormField, FormLabel, FormLabelAndMessage, FormMessage, Input } from '@components/StyledElements/Form/Form' +import FormLayout, { ButtonBlack, FormField, FormLabelAndMessage, Input } from '@components/StyledElements/Form/Form' import * as Form from '@radix-ui/react-form'; import { useFormik } from 'formik'; import { BarLoader } from 'react-spinners'; import React from 'react' -import { createNewOrganization } from '@services/organizations/orgs'; import { swrFetcher } from '@services/utils/ts/requests'; import { getAPIUrl } from '@services/config/config'; -import useSWR, { mutate } from "swr"; +import useSWR from "swr"; import { createNewOrgInstall, updateInstall } from '@services/install/install'; import { useRouter } from 'next/navigation'; import { Check } from 'lucide-react'; diff --git a/apps/web/app/install/steps/sample_data.tsx b/apps/web/app/install/steps/sample_data.tsx index c03cfcb2..8386002f 100644 --- a/apps/web/app/install/steps/sample_data.tsx +++ b/apps/web/app/install/steps/sample_data.tsx @@ -3,7 +3,7 @@ import { createSampleDataInstall, updateInstall } from '@services/install/instal import { swrFetcher } from '@services/utils/ts/requests'; import { useRouter } from 'next/navigation'; import React from 'react' -import useSWR, { mutate } from "swr"; +import useSWR from "swr"; function SampleData() { const { data: install, error: error, isLoading } = useSWR(`${getAPIUrl()}install/latest`, swrFetcher); diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/collection/[collectionid]/page.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/collection/[collectionid]/page.tsx index 95b61d7e..1609be04 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/collection/[collectionid]/page.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/collection/[collectionid]/page.tsx @@ -1,6 +1,6 @@ import GeneralWrapperStyled from "@components/StyledElements/Wrappers/GeneralWrapper"; -import { getAccessTokenFromRefreshTokenCookie, getNewAccessTokenUsingRefreshTokenServer } from "@services/auth/auth"; -import { getBackendUrl, getUriWithOrg } from "@services/config/config"; +import { getAccessTokenFromRefreshTokenCookie } from "@services/auth/auth"; +import { getUriWithOrg } from "@services/config/config"; import { getCollectionByIdWithAuthHeader } from "@services/courses/collections"; import { getCourseThumbnailMediaDirectory } from "@services/media/media"; import { getOrganizationContextInfo } from "@services/organizations/orgs"; diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/collections/new/page.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/collections/new/page.tsx index e4bf8239..b36f368b 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/collections/new/page.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/collections/new/page.tsx @@ -5,7 +5,6 @@ import { createCollection } from "@services/courses/collections"; import useSWR from "swr"; import { getAPIUrl, getUriWithOrg } from "@services/config/config"; import { revalidateTags, swrFetcher } from "@services/utils/ts/requests"; -import { getOrganizationContextInfo } from "@services/organizations/orgs"; import { useOrg } from "@components/Contexts/OrgContext"; function NewCollection(params: any) { diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/activity/[activityid]/page.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/activity/[activityid]/page.tsx index 8a12424d..f81abeb7 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/activity/[activityid]/page.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/activity/[activityid]/page.tsx @@ -4,7 +4,7 @@ import { cookies } from "next/headers"; import ActivityClient from "./activity"; import { getOrganizationContextInfo } from "@services/organizations/orgs"; import { Metadata } from "next"; -import { getAccessTokenFromRefreshTokenCookie, getNewAccessTokenUsingRefreshTokenServer } from "@services/auth/auth"; +import { getAccessTokenFromRefreshTokenCookie } from "@services/auth/auth"; type MetadataProps = { diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx index 5f4f5569..a95fe4c0 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx @@ -1,7 +1,7 @@ "use client"; import { removeCourse, startCourse } from "@services/courses/activity"; import Link from "next/link"; -import React, { use, useEffect, useState } from "react"; +import React, { useEffect, useState } from "react"; import { getUriWithOrg } from "@services/config/config"; import PageLoading from "@components/Objects/Loaders/PageLoading"; import { revalidateTags } from "@services/utils/ts/requests"; @@ -9,9 +9,7 @@ import ActivityIndicators from "@components/Pages/Courses/ActivityIndicators"; import { useRouter } from "next/navigation"; import GeneralWrapperStyled from "@components/StyledElements/Wrappers/GeneralWrapper"; import { getCourseThumbnailMediaDirectory, getUserAvatarMediaDirectory } from "@services/media/media"; -import { ArrowRight, Check, File, Sparkles, Star, Video } from "lucide-react"; -import Avvvatars from "avvvatars-react"; -import { getUser } from "@services/users/users"; +import { ArrowRight, Check, File, Sparkles, Video } from "lucide-react"; import { useOrg } from "@components/Contexts/OrgContext"; import UserAvatar from "@components/Objects/UserAvatar"; diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/page.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/page.tsx index 75e3f295..7a659988 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/page.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/page.tsx @@ -4,7 +4,7 @@ import { cookies } from 'next/headers'; import { getCourseMetadataWithAuthHeader } from '@services/courses/courses'; import { getOrganizationContextInfo } from '@services/organizations/orgs'; import { Metadata } from 'next'; -import { getAccessTokenFromRefreshTokenCookie, getNewAccessTokenUsingRefreshTokenServer } from '@services/auth/auth'; +import { getAccessTokenFromRefreshTokenCookie } from '@services/auth/auth'; type MetadataProps = { params: { orgslug: string, courseuuid: string }; diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/courses/page.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/courses/page.tsx index 11345bff..301a2a3c 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/courses/page.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/courses/page.tsx @@ -5,7 +5,7 @@ import { getOrgCoursesWithAuthHeader } from "@services/courses/courses"; import { Metadata } from "next"; import { getOrganizationContextInfo } from "@services/organizations/orgs"; import { cookies } from "next/headers"; -import { getAccessTokenFromRefreshTokenCookie, getNewAccessTokenUsingRefreshTokenServer } from "@services/auth/auth"; +import { getAccessTokenFromRefreshTokenCookie } from "@services/auth/auth"; type MetadataProps = { params: { orgslug: string }; diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/page.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/page.tsx index 999456ec..9196ca21 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/page.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/page.tsx @@ -12,7 +12,6 @@ import { getAccessTokenFromRefreshTokenCookie } from '@services/auth/auth'; import CourseThumbnail from '@components/Objects/Thumbnails/CourseThumbnail'; import CollectionThumbnail from '@components/Objects/Thumbnails/CollectionThumbnail'; import AuthenticatedClientElement from '@components/Security/AuthenticatedClientElement'; -import { Plus, PlusCircle } from 'lucide-react'; import NewCourseButton from '@components/StyledElements/Buttons/NewCourseButton'; import NewCollectionButton from '@components/StyledElements/Buttons/NewCollectionButton'; diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/trail/trail.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/trail/trail.tsx index fa1bf139..6f684dfc 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/trail/trail.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/trail/trail.tsx @@ -5,10 +5,9 @@ import TrailCourseElement from "@components/Pages/Trail/TrailCourseElement"; import TypeOfContentTitle from "@components/StyledElements/Titles/TypeOfContentTitle"; import GeneralWrapperStyled from "@components/StyledElements/Wrappers/GeneralWrapper"; import { getAPIUrl } from "@services/config/config"; -import { removeCourse } from "@services/courses/activity"; -import { revalidateTags, swrFetcher } from "@services/utils/ts/requests"; +import { swrFetcher } from "@services/utils/ts/requests"; import React, { useEffect } from "react"; -import useSWR, { mutate } from "swr"; +import useSWR from "swr"; function Trail(params: any) { let orgslug = params.orgslug; diff --git a/apps/web/app/orgs/[orgslug]/dash/courses/client.tsx b/apps/web/app/orgs/[orgslug]/dash/courses/client.tsx index 9a290f15..c2308527 100644 --- a/apps/web/app/orgs/[orgslug]/dash/courses/client.tsx +++ b/apps/web/app/orgs/[orgslug]/dash/courses/client.tsx @@ -5,7 +5,6 @@ import CourseThumbnail from '@components/Objects/Thumbnails/CourseThumbnail'; import AuthenticatedClientElement from '@components/Security/AuthenticatedClientElement'; import NewCourseButton from '@components/StyledElements/Buttons/NewCourseButton'; import Modal from '@components/StyledElements/Modal/Modal'; -import Link from 'next/link' import { useSearchParams } from 'next/navigation'; import React from 'react' diff --git a/apps/web/app/orgs/[orgslug]/dash/courses/course/[courseuuid]/[subpage]/page.tsx b/apps/web/app/orgs/[orgslug]/dash/courses/course/[courseuuid]/[subpage]/page.tsx index d64d1331..36482263 100644 --- a/apps/web/app/orgs/[orgslug]/dash/courses/course/[courseuuid]/[subpage]/page.tsx +++ b/apps/web/app/orgs/[orgslug]/dash/courses/course/[courseuuid]/[subpage]/page.tsx @@ -1,20 +1,13 @@ 'use client'; import EditCourseStructure from '../../../../../../../../components/Dashboard/Course/EditCourseStructure/EditCourseStructure' -import BreadCrumbs from '@components/Dashboard/UI/BreadCrumbs' -import PageLoading from '@components/Objects/Loaders/PageLoading'; -import ClientComponentSkeleton from '@components/Utils/ClientComp'; -import { getAPIUrl, getUriWithOrg } from '@services/config/config'; -import { swrFetcher } from '@services/utils/ts/requests'; -import React, { createContext, use, useEffect, useState } from 'react' -import useSWR from 'swr'; -import { CourseProvider, useCourse } from '../../../../../../../../components/Contexts/CourseContext'; -import SaveState from '@components/Dashboard/UI/SaveState'; +import { getUriWithOrg } from '@services/config/config'; +import React from 'react' +import { CourseProvider } from '../../../../../../../../components/Contexts/CourseContext'; import Link from 'next/link'; import { CourseOverviewTop } from '@components/Dashboard/UI/CourseOverviewTop'; -import { CSSTransition } from 'react-transition-group'; import { motion } from 'framer-motion'; import EditCourseGeneral from '@components/Dashboard/Course/EditCourseGeneral/EditCourseGeneral'; -import { GalleryVertical, GalleryVerticalEnd, Info } from 'lucide-react'; +import { GalleryVerticalEnd, Info } from 'lucide-react'; export type CourseOverviewParams = { orgslug: string, diff --git a/apps/web/app/orgs/[orgslug]/dash/page.tsx b/apps/web/app/orgs/[orgslug]/dash/page.tsx index 9ef5faa2..861c9f0d 100644 --- a/apps/web/app/orgs/[orgslug]/dash/page.tsx +++ b/apps/web/app/orgs/[orgslug]/dash/page.tsx @@ -1,7 +1,6 @@ import Image from 'next/image' import React from 'react' import learnhousetextlogo from '../../../../public/learnhouse_logo.png' -import learnhouseiconlogo from '../../../../public/learnhouse_bigicon.png' import { BookCopy, School, Settings, Users } from 'lucide-react' import Link from 'next/link' import AdminAuthorization from '@components/Security/AdminAuthorization' diff --git a/apps/web/app/orgs/[orgslug]/dash/users/settings/[subpage]/page.tsx b/apps/web/app/orgs/[orgslug]/dash/users/settings/[subpage]/page.tsx index 86aa4163..656793ab 100644 --- a/apps/web/app/orgs/[orgslug]/dash/users/settings/[subpage]/page.tsx +++ b/apps/web/app/orgs/[orgslug]/dash/users/settings/[subpage]/page.tsx @@ -1,11 +1,9 @@ 'use client'; import React, { useEffect } from 'react' import { motion } from 'framer-motion'; -import UserEditGeneral from '@components/Dashboard/UserAccount/UserEditGeneral/UserEditGeneral'; -import UserEditPassword from '@components/Dashboard/UserAccount/UserEditPassword/UserEditPassword'; import Link from 'next/link'; import { getUriWithOrg } from '@services/config/config'; -import { Info, Lock, ScanEye, User, UserCog, UserPlus, Users } from 'lucide-react'; +import { ScanEye, UserPlus, Users } from 'lucide-react'; import BreadCrumbs from '@components/Dashboard/UI/BreadCrumbs'; import { useSession } from '@components/Contexts/SessionContext'; import { useOrg } from '@components/Contexts/OrgContext'; diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 384f6225..e54ccc9a 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,5 +1,4 @@ "use client"; -import type { NextPage } from "next"; import { motion } from "framer-motion"; import styled from "styled-components"; import learnhouseBigIcon from "public/learnhouse_bigicon.png"; diff --git a/apps/web/components/Contexts/CourseContext.tsx b/apps/web/components/Contexts/CourseContext.tsx index 7489def7..8aa42695 100644 --- a/apps/web/components/Contexts/CourseContext.tsx +++ b/apps/web/components/Contexts/CourseContext.tsx @@ -3,7 +3,7 @@ import PageLoading from '@components/Objects/Loaders/PageLoading'; import { getAPIUrl } from '@services/config/config'; import { swrFetcher } from '@services/utils/ts/requests'; import React, { createContext, useContext, useEffect, useReducer } from 'react' -import useSWR, { mutate } from 'swr'; +import useSWR from 'swr'; export const CourseContext = createContext(null) as any; export const CourseDispatchContext = createContext(null) as any; diff --git a/apps/web/components/Dashboard/Course/EditCourseStructure/Buttons/NewActivityButton.tsx b/apps/web/components/Dashboard/Course/EditCourseStructure/Buttons/NewActivityButton.tsx index fbc1bf8b..7b141a08 100644 --- a/apps/web/components/Dashboard/Course/EditCourseStructure/Buttons/NewActivityButton.tsx +++ b/apps/web/components/Dashboard/Course/EditCourseStructure/Buttons/NewActivityButton.tsx @@ -5,9 +5,9 @@ import { getAPIUrl } from '@services/config/config'; import { createActivity, createExternalVideoActivity, createFileActivity } from '@services/courses/activities'; import { getOrganizationContextInfoWithoutCredentials } from '@services/organizations/orgs'; import { revalidateTags } from '@services/utils/ts/requests'; -import { Layers, Sparkles } from 'lucide-react' +import { Layers } from 'lucide-react' import { useRouter } from 'next/navigation'; -import React, { use, useEffect } from 'react' +import React, { useEffect } from 'react' import { mutate } from 'swr'; type NewActivityButtonProps = { diff --git a/apps/web/components/Dashboard/Course/EditCourseStructure/DraggableElements/ChapterElement.tsx b/apps/web/components/Dashboard/Course/EditCourseStructure/DraggableElements/ChapterElement.tsx index ffca6a71..a0af7cdd 100644 --- a/apps/web/components/Dashboard/Course/EditCourseStructure/DraggableElements/ChapterElement.tsx +++ b/apps/web/components/Dashboard/Course/EditCourseStructure/DraggableElements/ChapterElement.tsx @@ -1,10 +1,8 @@ import ConfirmationModal from '@components/StyledElements/ConfirmationModal/ConfirmationModal'; -import { Activity, Hexagon, MoreHorizontal, MoreVertical, Pencil, Save, Sparkles, X } from 'lucide-react'; +import { Hexagon, MoreHorizontal, MoreVertical, Pencil, Save, X } from 'lucide-react'; import React from 'react' -import ActivitiyElement from './ActivityElement'; import { Draggable, Droppable } from 'react-beautiful-dnd'; import ActivityElement from './ActivityElement'; -import NewActivity from '../Buttons/NewActivityButton'; import NewActivityButton from '../Buttons/NewActivityButton'; import { deleteChapter, updateChapter } from '@services/courses/chapters'; import { revalidateTags } from '@services/utils/ts/requests'; diff --git a/apps/web/components/Dashboard/Course/EditCourseStructure/EditCourseStructure.tsx b/apps/web/components/Dashboard/Course/EditCourseStructure/EditCourseStructure.tsx index 43c26be6..ce07e1ad 100644 --- a/apps/web/components/Dashboard/Course/EditCourseStructure/EditCourseStructure.tsx +++ b/apps/web/components/Dashboard/Course/EditCourseStructure/EditCourseStructure.tsx @@ -1,12 +1,12 @@ 'use client'; import { getAPIUrl } from '@services/config/config'; -import { revalidateTags, swrFetcher } from '@services/utils/ts/requests'; -import React, { useContext, useEffect, useState } from 'react' -import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'; -import useSWR, { mutate } from 'swr'; +import { revalidateTags } from '@services/utils/ts/requests'; +import React, { useEffect, useState } from 'react' +import { DragDropContext, Droppable } from 'react-beautiful-dnd'; +import { mutate } from 'swr'; import ChapterElement from './DraggableElements/ChapterElement'; import PageLoading from '@components/Objects/Loaders/PageLoading'; -import { createChapter, updateCourseOrderStructure } from '@services/courses/chapters'; +import { createChapter } from '@services/courses/chapters'; import { useRouter } from 'next/navigation'; import { useCourse, useCourseDispatch } from '@components/Contexts/CourseContext'; import { Hexagon } from 'lucide-react'; diff --git a/apps/web/components/Dashboard/Org/OrgEditGeneral/OrgEditGeneral.tsx b/apps/web/components/Dashboard/Org/OrgEditGeneral/OrgEditGeneral.tsx index 35793f9c..76b5abd6 100644 --- a/apps/web/components/Dashboard/Org/OrgEditGeneral/OrgEditGeneral.tsx +++ b/apps/web/components/Dashboard/Org/OrgEditGeneral/OrgEditGeneral.tsx @@ -1,5 +1,5 @@ "use client"; -import React, { use, useEffect, useState } from 'react' +import React, { useEffect, useState } from 'react' import { Field, Form, Formik } from 'formik'; import { updateOrganization, uploadOrganizationLogo } from '@services/settings/org'; import { UploadCloud } from 'lucide-react'; diff --git a/apps/web/components/Dashboard/UI/BreadCrumbs.tsx b/apps/web/components/Dashboard/UI/BreadCrumbs.tsx index 8efe010b..0ed3fc28 100644 --- a/apps/web/components/Dashboard/UI/BreadCrumbs.tsx +++ b/apps/web/components/Dashboard/UI/BreadCrumbs.tsx @@ -1,7 +1,7 @@ import { useCourse } from '@components/Contexts/CourseContext' import { Book, ChevronRight, School, User, Users } from 'lucide-react' import Link from 'next/link' -import React, { use, useEffect } from 'react' +import React from 'react' type BreadCrumbsProps = { type: 'courses' | 'user' | 'users' | 'org' | 'orgusers' diff --git a/apps/web/components/Dashboard/UI/LeftMenu.tsx b/apps/web/components/Dashboard/UI/LeftMenu.tsx index abbe3237..e87d8033 100644 --- a/apps/web/components/Dashboard/UI/LeftMenu.tsx +++ b/apps/web/components/Dashboard/UI/LeftMenu.tsx @@ -4,7 +4,7 @@ import { useSession } from '@components/Contexts/SessionContext'; import ToolTip from '@components/StyledElements/Tooltip/Tooltip' import LearnHouseDashboardLogo from '@public/dashLogo.png'; import { logout } from '@services/auth/auth'; -import { ArrowLeft, Book, BookCopy, Home, LogOut, School, Settings, Users } from 'lucide-react' +import { BookCopy, Home, LogOut, School, Settings, Users } from 'lucide-react' import Image from 'next/image'; import Link from 'next/link' import { useRouter } from 'next/navigation'; diff --git a/apps/web/components/Dashboard/UserAccount/UserEditGeneral/UserEditGeneral.tsx b/apps/web/components/Dashboard/UserAccount/UserEditGeneral/UserEditGeneral.tsx index 8c5726ca..df0da731 100644 --- a/apps/web/components/Dashboard/UserAccount/UserEditGeneral/UserEditGeneral.tsx +++ b/apps/web/components/Dashboard/UserAccount/UserEditGeneral/UserEditGeneral.tsx @@ -1,6 +1,6 @@ import { updateProfile } from '@services/settings/profile'; import React, { useEffect } from 'react' -import { Formik, Form, Field, ErrorMessage } from 'formik'; +import { Formik, Form, Field } from 'formik'; import { useSession } from '@components/Contexts/SessionContext'; import { ArrowBigUpDash, Check, FileWarning, Info, UploadCloud } from 'lucide-react'; import UserAvatar from '@components/Objects/UserAvatar'; diff --git a/apps/web/components/Dashboard/UserAccount/UserEditPassword/UserEditPassword.tsx b/apps/web/components/Dashboard/UserAccount/UserEditPassword/UserEditPassword.tsx index 996aa53c..388d491b 100644 --- a/apps/web/components/Dashboard/UserAccount/UserEditPassword/UserEditPassword.tsx +++ b/apps/web/components/Dashboard/UserAccount/UserEditPassword/UserEditPassword.tsx @@ -1,6 +1,6 @@ import { useSession } from '@components/Contexts/SessionContext'; import { updatePassword } from '@services/settings/password'; -import { Formik, Form, Field, ErrorMessage } from 'formik'; +import { Formik, Form, Field } from 'formik'; import React, { useEffect } from 'react' function UserEditPassword() { diff --git a/apps/web/components/Dashboard/Users/OrgAccess/OrgAccess.tsx b/apps/web/components/Dashboard/Users/OrgAccess/OrgAccess.tsx index a2670677..58dce7f8 100644 --- a/apps/web/components/Dashboard/Users/OrgAccess/OrgAccess.tsx +++ b/apps/web/components/Dashboard/Users/OrgAccess/OrgAccess.tsx @@ -5,7 +5,7 @@ import { getAPIUrl, getUriWithOrg } from '@services/config/config'; import { swrFetcher } from '@services/utils/ts/requests'; import { Globe, Shield, X } from 'lucide-react' import Link from 'next/link'; -import React, { use, useEffect } from 'react' +import React, { useEffect } from 'react' import useSWR, { mutate } from 'swr'; import dayjs from 'dayjs'; import { changeSignupMechanism, createInviteCode, deleteInviteCode } from '@services/organizations/invites'; diff --git a/apps/web/components/Dashboard/Users/OrgUsers/OrgUsers.tsx b/apps/web/components/Dashboard/Users/OrgUsers/OrgUsers.tsx index bbc599d7..c7a89368 100644 --- a/apps/web/components/Dashboard/Users/OrgUsers/OrgUsers.tsx +++ b/apps/web/components/Dashboard/Users/OrgUsers/OrgUsers.tsx @@ -7,8 +7,8 @@ import Toast from '@components/StyledElements/Toast/Toast'; import { getAPIUrl } from '@services/config/config'; import { removeUserFromOrg } from '@services/organizations/orgs'; import { swrFetcher } from '@services/utils/ts/requests'; -import { KeyRound, LogOut, X } from 'lucide-react'; -import React, { use, useEffect } from 'react' +import { KeyRound, LogOut } from 'lucide-react'; +import React, { useEffect } from 'react' import toast from 'react-hot-toast'; import useSWR, { mutate } from 'swr'; diff --git a/apps/web/components/Objects/Activities/AI/AIActivityAsk.tsx b/apps/web/components/Objects/Activities/AI/AIActivityAsk.tsx index c4ab2440..3a6a358a 100644 --- a/apps/web/components/Objects/Activities/AI/AIActivityAsk.tsx +++ b/apps/web/components/Objects/Activities/AI/AIActivityAsk.tsx @@ -1,17 +1,13 @@ import { useSession } from '@components/Contexts/SessionContext' import { sendActivityAIChatMessage, startActivityAIChatSession } from '@services/ai/ai'; -import { AlertTriangle, BadgeInfo, NotebookTabs, User } from 'lucide-react'; -import Avvvatars from 'avvvatars-react'; +import { AlertTriangle, BadgeInfo, NotebookTabs } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; -import { FlaskConical, Keyboard, MessageCircle, MessageSquareIcon, Sparkle, Sparkles, X } from 'lucide-react' +import { FlaskConical, MessageCircle, X } from 'lucide-react' import Image from 'next/image'; -import { send } from 'process'; import learnhouseAI_icon from "public/learnhouse_ai_simple.png"; import learnhouseAI_logo_black from "public/learnhouse_ai_black_logo.png"; -import React, { use, useEffect, useRef } from 'react' +import React, { useEffect, useRef } from 'react' import { AIChatBotStateTypes, useAIChatBot, useAIChatBotDispatch } from '@components/Contexts/AI/AIChatBotContext'; -import FeedbackModal from '@components/Objects/Modals/Feedback/Feedback'; -import Modal from '@components/StyledElements/Modal/Modal'; import useGetAIFeatures from '../../../AI/Hooks/useGetAIFeatures'; import UserAvatar from '@components/Objects/UserAvatar'; diff --git a/apps/web/components/Objects/Activities/DocumentPdf/DocumentPdf.tsx b/apps/web/components/Objects/Activities/DocumentPdf/DocumentPdf.tsx index 68598005..ab5fb25c 100644 --- a/apps/web/components/Objects/Activities/DocumentPdf/DocumentPdf.tsx +++ b/apps/web/components/Objects/Activities/DocumentPdf/DocumentPdf.tsx @@ -1,5 +1,4 @@ import { useOrg } from "@components/Contexts/OrgContext"; -import { getBackendUrl } from "@services/config/config"; import { getActivityMediaDirectory } from "@services/media/media"; import React from "react"; diff --git a/apps/web/components/Objects/Activities/DynamicCanva/DynamicCanva.tsx b/apps/web/components/Objects/Activities/DynamicCanva/DynamicCanva.tsx index 55d487bf..12b486c2 100644 --- a/apps/web/components/Objects/Activities/DynamicCanva/DynamicCanva.tsx +++ b/apps/web/components/Objects/Activities/DynamicCanva/DynamicCanva.tsx @@ -1,4 +1,4 @@ -import { useEditor, EditorContent, BubbleMenu, EditorProvider } from "@tiptap/react"; +import { useEditor, EditorContent } from "@tiptap/react"; import StarterKit from "@tiptap/starter-kit"; import styled from "styled-components" import Youtube from "@tiptap/extension-youtube"; diff --git a/apps/web/components/Objects/Activities/Video/Video.tsx b/apps/web/components/Objects/Activities/Video/Video.tsx index f61a23be..b277e68e 100644 --- a/apps/web/components/Objects/Activities/Video/Video.tsx +++ b/apps/web/components/Objects/Activities/Video/Video.tsx @@ -1,6 +1,4 @@ -import { getBackendUrl } from "@services/config/config"; import React from "react"; -import styled from "styled-components"; import YouTube from 'react-youtube'; import { getActivityMediaDirectory } from "@services/media/media"; import { useOrg } from "@components/Contexts/OrgContext"; diff --git a/apps/web/components/Objects/Editor/AI/AIEditorToolkit.tsx b/apps/web/components/Objects/Editor/AI/AIEditorToolkit.tsx index d2babbd0..97bfca44 100644 --- a/apps/web/components/Objects/Editor/AI/AIEditorToolkit.tsx +++ b/apps/web/components/Objects/Editor/AI/AIEditorToolkit.tsx @@ -2,9 +2,8 @@ import React from 'react' import learnhouseAI_icon from "public/learnhouse_ai_simple.png"; import { motion, AnimatePresence } from 'framer-motion'; import Image from 'next/image'; -import { AlertTriangle, BetweenHorizontalStart, FastForward, Feather, FileStack, HelpCircle, Languages, MessageCircle, MoreVertical, Pen, X } from 'lucide-react'; +import { AlertTriangle, BetweenHorizontalStart, FastForward, Feather, FileStack, HelpCircle, Languages, MoreVertical, X } from 'lucide-react'; import { Editor } from '@tiptap/react'; -import { AIChatBotStateTypes, useAIChatBot, useAIChatBotDispatch } from '@components/Contexts/AI/AIChatBotContext'; import { AIEditorStateTypes, useAIEditor, useAIEditorDispatch } from '@components/Contexts/AI/AIEditorContext'; import { sendActivityAIChatMessage, startActivityAIChatSession } from '@services/ai/ai'; import useGetAIFeatures from '@components/AI/Hooks/useGetAIFeatures'; diff --git a/apps/web/components/Objects/Editor/Editor.tsx b/apps/web/components/Objects/Editor/Editor.tsx index 29a9566d..f26349fe 100644 --- a/apps/web/components/Objects/Editor/Editor.tsx +++ b/apps/web/components/Objects/Editor/Editor.tsx @@ -1,6 +1,6 @@ 'use client'; import React from "react"; -import { useEditor, EditorContent, BubbleMenu } from "@tiptap/react"; +import { useEditor, EditorContent } from "@tiptap/react"; import StarterKit from "@tiptap/starter-kit"; import learnhouseIcon from "public/learnhouse_icon.png"; import { ToolbarButtons } from "./Toolbar/ToolbarButtons"; @@ -8,7 +8,6 @@ import { motion } from "framer-motion"; import Image from "next/image"; import styled from "styled-components"; import { DividerVerticalIcon, SlashIcon } from "@radix-ui/react-icons"; -import Avvvatars from "avvvatars-react"; import learnhouseAI_icon from "public/learnhouse_ai_simple.png"; import { AIEditorStateTypes, useAIEditor, useAIEditorDispatch } from "@components/Contexts/AI/AIEditorContext"; diff --git a/apps/web/components/Objects/Editor/Extensions/MathEquation/MathEquationBlockComponent.tsx b/apps/web/components/Objects/Editor/Extensions/MathEquation/MathEquationBlockComponent.tsx index d7fe11c0..2f0f6a8f 100644 --- a/apps/web/components/Objects/Editor/Extensions/MathEquation/MathEquationBlockComponent.tsx +++ b/apps/web/components/Objects/Editor/Extensions/MathEquation/MathEquationBlockComponent.tsx @@ -2,8 +2,8 @@ import { NodeViewWrapper } from "@tiptap/react"; import React from "react"; import styled from "styled-components"; import "katex/dist/katex.min.css"; -import { InlineMath, BlockMath } from "react-katex"; -import { Edit, Save } from "lucide-react"; +import { BlockMath } from "react-katex"; +import { Save } from "lucide-react"; import Link from "next/link"; import { useEditorProvider } from "@components/Contexts/Editor/EditorContext"; diff --git a/apps/web/components/Objects/Editor/Extensions/PDF/PDFBlockComponent.tsx b/apps/web/components/Objects/Editor/Extensions/PDF/PDFBlockComponent.tsx index 4946f762..25154eb9 100644 --- a/apps/web/components/Objects/Editor/Extensions/PDF/PDFBlockComponent.tsx +++ b/apps/web/components/Objects/Editor/Extensions/PDF/PDFBlockComponent.tsx @@ -1,9 +1,8 @@ import { NodeViewWrapper } from "@tiptap/react"; import React, { useEffect } from "react"; import styled from "styled-components"; -import { AlertCircle, AlertTriangle, FileText, Image, ImagePlus, Info, Loader } from "lucide-react"; -import { getPDFFile, uploadNewPDFFile } from "../../../../../services/blocks/Pdf/pdf"; -import { getBackendUrl } from "../../../../../services/config/config"; +import { AlertTriangle, FileText, Loader } from "lucide-react"; +import { uploadNewPDFFile } from "../../../../../services/blocks/Pdf/pdf"; import { UploadIcon } from "@radix-ui/react-icons"; import { getActivityBlockMediaDirectory } from "@services/media/media"; import { useOrg } from "@components/Contexts/OrgContext"; diff --git a/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx b/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx index d0cc0db0..7d434be6 100644 --- a/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx +++ b/apps/web/components/Objects/Editor/Extensions/Quiz/QuizBlockComponent.tsx @@ -1,8 +1,8 @@ import { NodeViewWrapper } from "@tiptap/react"; import { v4 as uuidv4 } from "uuid"; -import { twJoin, twMerge } from 'tailwind-merge' +import { twMerge } from 'tailwind-merge' import React from "react"; -import { BadgeHelp, Check, Info, Minus, MoreVertical, Plus, RefreshCcw, X } from "lucide-react"; +import { BadgeHelp, Check, Minus, Plus, RefreshCcw } from "lucide-react"; import ReactConfetti from "react-confetti"; import { useEditorProvider } from "@components/Contexts/Editor/EditorContext"; diff --git a/apps/web/components/Objects/Editor/Extensions/Video/VideoBlockComponent.tsx b/apps/web/components/Objects/Editor/Extensions/Video/VideoBlockComponent.tsx index 1b597ac8..be16b501 100644 --- a/apps/web/components/Objects/Editor/Extensions/Video/VideoBlockComponent.tsx +++ b/apps/web/components/Objects/Editor/Extensions/Video/VideoBlockComponent.tsx @@ -1,8 +1,7 @@ import { NodeViewWrapper } from "@tiptap/react"; -import { AlertTriangle, Image, Loader, Video } from "lucide-react"; +import { Loader, Video } from "lucide-react"; import React, { useEffect } from "react"; import styled from "styled-components"; -import { getBackendUrl } from "../../../../../services/config/config"; import { uploadNewVideoFile } from "../../../../../services/blocks/Video/video"; import { getActivityBlockMediaDirectory } from "@services/media/media"; import { UploadIcon } from "@radix-ui/react-icons"; diff --git a/apps/web/components/Objects/Menu/Menu.tsx b/apps/web/components/Objects/Menu/Menu.tsx index af38aa01..e6623866 100644 --- a/apps/web/components/Objects/Menu/Menu.tsx +++ b/apps/web/components/Objects/Menu/Menu.tsx @@ -1,15 +1,10 @@ 'use client'; -import React, { useEffect } from "react"; +import React from "react"; import Link from "next/link"; import { getAPIUrl, getUriWithOrg } from "@services/config/config"; -import { getOrganizationContextInfo, getOrganizationContextInfoWithoutCredentials } from "@services/organizations/orgs"; -import ClientComponentSkeleton from "@components/Utils/ClientComp"; import { HeaderProfileBox } from "@components/Security/HeaderProfileBox"; import MenuLinks from "./MenuLinks"; import { getOrgLogoMediaDirectory } from "@services/media/media"; -import { MessageSquareIcon } from "lucide-react"; -import Modal from "@components/StyledElements/Modal/Modal"; -import FeedbackModal from "../Modals/Feedback/Feedback"; import useSWR from "swr"; import { swrFetcher } from "@services/utils/ts/requests"; diff --git a/apps/web/components/Objects/Menu/ProfileArea.tsx b/apps/web/components/Objects/Menu/ProfileArea.tsx index e96f3945..5f33e82f 100644 --- a/apps/web/components/Objects/Menu/ProfileArea.tsx +++ b/apps/web/components/Objects/Menu/ProfileArea.tsx @@ -2,12 +2,9 @@ import React from "react"; import styled from "styled-components"; import Link from "next/link"; -import Avvvatars from "avvvatars-react"; -import { GearIcon } from "@radix-ui/react-icons"; import { getNewAccessTokenUsingRefreshToken, getUserInfo } from "@services/auth/auth"; import { usePathname } from "next/navigation"; import { useRouter } from "next/router"; -import path from "path"; import { Settings } from "lucide-react"; import UserAvatar from "@components/Objects/UserAvatar"; diff --git a/apps/web/components/Objects/Modals/Activities/Create/NewActivity.tsx b/apps/web/components/Objects/Modals/Activities/Create/NewActivity.tsx index 38d0914a..2a5e825d 100644 --- a/apps/web/components/Objects/Modals/Activities/Create/NewActivity.tsx +++ b/apps/web/components/Objects/Modals/Activities/Create/NewActivity.tsx @@ -1,9 +1,8 @@ import React, { useState } from "react"; -import { ArrowLeftIcon, Cross1Icon } from "@radix-ui/react-icons"; import DynamicPageActivityImage from "public/activities_types/dynamic-page-activity.png"; import VideoPageActivityImage from "public//activities_types/video-page-activity.png"; import DocumentPdfPageActivityImage from "public//activities_types/documentpdf-page-activity.png"; -import { styled, keyframes } from '@stitches/react'; +import { styled } from '@stitches/react'; import DynamicCanvaModal from "./NewActivityModal/DynamicCanva"; import VideoModal from "./NewActivityModal/Video"; import Image from "next/image"; diff --git a/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/DocumentPdf.tsx b/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/DocumentPdf.tsx index d2614649..a8e81671 100644 --- a/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/DocumentPdf.tsx +++ b/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/DocumentPdf.tsx @@ -1,4 +1,4 @@ -import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, FormMessage, Input, Textarea } from "@components/StyledElements/Form/Form"; +import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, FormMessage, Input } from "@components/StyledElements/Form/Form"; import React, { useState } from "react"; import * as Form from '@radix-ui/react-form'; import BarLoader from "react-spinners/BarLoader"; diff --git a/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/Video.tsx b/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/Video.tsx index a93b4ecb..4e82920b 100644 --- a/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/Video.tsx +++ b/apps/web/components/Objects/Modals/Activities/Create/NewActivityModal/Video.tsx @@ -1,4 +1,4 @@ -import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, FormMessage, Input, Textarea } from "@components/StyledElements/Form/Form"; +import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, FormMessage, Input } from "@components/StyledElements/Form/Form"; import React, { useState } from "react"; import * as Form from '@radix-ui/react-form'; import BarLoader from "react-spinners/BarLoader"; diff --git a/apps/web/components/Objects/Modals/Dash/OrgUsers/RolesUpdate.tsx b/apps/web/components/Objects/Modals/Dash/OrgUsers/RolesUpdate.tsx index 6c58062f..c4e95e49 100644 --- a/apps/web/components/Objects/Modals/Dash/OrgUsers/RolesUpdate.tsx +++ b/apps/web/components/Objects/Modals/Dash/OrgUsers/RolesUpdate.tsx @@ -1,11 +1,10 @@ 'use client'; import { useOrg } from '@components/Contexts/OrgContext'; -import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, Input, Textarea } from '@components/StyledElements/Form/Form' +import FormLayout, { ButtonBlack, Flex, FormField, FormLabel } from '@components/StyledElements/Form/Form' import * as Form from '@radix-ui/react-form' import { FormMessage } from "@radix-ui/react-form"; import { getAPIUrl } from '@services/config/config'; import { updateUserRole } from '@services/organizations/orgs'; -import { swrFetcher } from '@services/utils/ts/requests'; import React, { useEffect } from 'react' import { BarLoader } from 'react-spinners'; import { mutate } from 'swr'; diff --git a/apps/web/components/Objects/Modals/Feedback/Feedback.tsx b/apps/web/components/Objects/Modals/Feedback/Feedback.tsx index 3f779301..b38663f5 100644 --- a/apps/web/components/Objects/Modals/Feedback/Feedback.tsx +++ b/apps/web/components/Objects/Modals/Feedback/Feedback.tsx @@ -1,10 +1,9 @@ -import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, FormMessage, Input, Textarea } from "@components/StyledElements/Form/Form" +import FormLayout, { ButtonBlack, Flex, FormField, FormLabel, FormMessage, Textarea } from "@components/StyledElements/Form/Form" import { BarLoader } from "react-spinners" import * as Form from '@radix-ui/react-form' import React, { useState } from "react"; import * as Sentry from '@sentry/browser'; import { CheckCircleIcon } from "lucide-react"; -import { randomUUID } from "crypto"; import { useSession } from "@components/Contexts/SessionContext"; export const FeedbackModal = (user: any) => { diff --git a/apps/web/components/Objects/Thumbnails/CourseThumbnail.tsx b/apps/web/components/Objects/Thumbnails/CourseThumbnail.tsx index 95451400..4dc3cf83 100644 --- a/apps/web/components/Objects/Thumbnails/CourseThumbnail.tsx +++ b/apps/web/components/Objects/Thumbnails/CourseThumbnail.tsx @@ -2,15 +2,14 @@ import { useOrg } from '@components/Contexts/OrgContext'; import AuthenticatedClientElement from '@components/Security/AuthenticatedClientElement'; import ConfirmationModal from '@components/StyledElements/ConfirmationModal/ConfirmationModal'; -import { DotsHorizontalIcon } from '@radix-ui/react-icons'; import { getUriWithOrg } from '@services/config/config'; import { deleteCourseFromBackend } from '@services/courses/courses'; import { getCourseThumbnailMediaDirectory } from '@services/media/media'; import { revalidateTags } from '@services/utils/ts/requests'; -import { FileEdit, MoreHorizontal, Settings, X } from 'lucide-react'; +import { Settings, X } from 'lucide-react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; -import React, { use, useEffect } from 'react' +import React, { useEffect } from 'react' type PropsType = { course: any, diff --git a/apps/web/components/Objects/UserAvatar.tsx b/apps/web/components/Objects/UserAvatar.tsx index 8c6484ae..573bca09 100644 --- a/apps/web/components/Objects/UserAvatar.tsx +++ b/apps/web/components/Objects/UserAvatar.tsx @@ -1,10 +1,6 @@ import { useSession } from '@components/Contexts/SessionContext'; -import emptyAvatar from '@public/empty_avatar.png'; -import aiAvatar from '@public/ai_avatar.png'; -import Image from 'next/image'; -import React, { use, useEffect } from 'react' +import React, { useEffect } from 'react' import { getUriWithOrg } from '@services/config/config'; -import { useOrg } from '@components/Contexts/OrgContext'; import { useParams } from 'next/navigation'; import { getUserAvatarMediaDirectory } from '@services/media/media'; diff --git a/apps/web/components/Pages/CourseEdit/Draggables/Activity.tsx b/apps/web/components/Pages/CourseEdit/Draggables/Activity.tsx index 54258f73..1e2acb75 100644 --- a/apps/web/components/Pages/CourseEdit/Draggables/Activity.tsx +++ b/apps/web/components/Pages/CourseEdit/Draggables/Activity.tsx @@ -2,7 +2,7 @@ import React from "react"; import Link from "next/link"; import { Draggable } from "react-beautiful-dnd"; import { getAPIUrl, getUriWithOrg } from "@services/config/config"; -import { FileText, Video, Sparkles, X, Pencil, MoreVertical, Eye, Save, File } from "lucide-react"; +import { Video, Sparkles, X, Pencil, MoreVertical, Eye, Save, File } from "lucide-react"; import { mutate } from "swr"; import { revalidateTags } from "@services/utils/ts/requests"; import { useRouter } from "next/navigation"; diff --git a/apps/web/components/Pages/CourseEdit/Draggables/Chapter.tsx b/apps/web/components/Pages/CourseEdit/Draggables/Chapter.tsx index 8e55af97..7a04017d 100644 --- a/apps/web/components/Pages/CourseEdit/Draggables/Chapter.tsx +++ b/apps/web/components/Pages/CourseEdit/Draggables/Chapter.tsx @@ -1,8 +1,8 @@ import React from "react"; import styled from "styled-components"; -import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; +import { Droppable, Draggable } from "react-beautiful-dnd"; import Activity from "./Activity"; -import { Folders, Hexagon, MoreVertical, Pencil, PlusSquare, Save, Sparkle, Sparkles, Trash, Trash2, X } from "lucide-react"; +import { Hexagon, MoreVertical, Pencil, Save, Sparkles, X } from "lucide-react"; import ConfirmationModal from "@components/StyledElements/ConfirmationModal/ConfirmationModal"; import { useRouter } from "next/navigation"; import { updateChapter } from "@services/courses/chapters"; diff --git a/apps/web/components/Pages/Trail/TrailCourseElement.tsx b/apps/web/components/Pages/Trail/TrailCourseElement.tsx index 78b0f64d..a6ddcf8e 100644 --- a/apps/web/components/Pages/Trail/TrailCourseElement.tsx +++ b/apps/web/components/Pages/Trail/TrailCourseElement.tsx @@ -1,12 +1,12 @@ 'use client'; import { useOrg } from '@components/Contexts/OrgContext'; -import { getAPIUrl, getBackendUrl, getUriWithOrg } from '@services/config/config'; +import { getAPIUrl, getUriWithOrg } from '@services/config/config'; import { removeCourse } from '@services/courses/activity'; import { getCourseThumbnailMediaDirectory } from '@services/media/media'; import { revalidateTags } from '@services/utils/ts/requests'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; -import { use, useEffect } from 'react'; +import { useEffect } from 'react'; import { mutate } from 'swr'; interface TrailCourseElementProps { diff --git a/apps/web/components/Security/HeaderProfileBox.tsx b/apps/web/components/Security/HeaderProfileBox.tsx index 02a4fd70..d507753a 100644 --- a/apps/web/components/Security/HeaderProfileBox.tsx +++ b/apps/web/components/Security/HeaderProfileBox.tsx @@ -1,9 +1,7 @@ 'use client'; -import React, { useEffect } from "react"; +import React from "react"; import styled from "styled-components"; import Link from "next/link"; -import Avvvatars from "avvvatars-react"; -import { GearIcon } from "@radix-ui/react-icons"; import { Settings } from "lucide-react"; import { useSession } from "@components/Contexts/SessionContext"; import UserAvatar from "@components/Objects/UserAvatar"; diff --git a/apps/web/components/StyledElements/Form/Form.tsx b/apps/web/components/StyledElements/Form/Form.tsx index 8abf88fe..cc877cbc 100644 --- a/apps/web/components/StyledElements/Form/Form.tsx +++ b/apps/web/components/StyledElements/Form/Form.tsx @@ -1,7 +1,7 @@ import React from 'react'; import * as Form from '@radix-ui/react-form'; -import { styled, keyframes } from '@stitches/react'; -import { blackA, violet, mauve } from '@radix-ui/colors'; +import { styled } from '@stitches/react'; +import { blackA } from '@radix-ui/colors'; import { Info } from 'lucide-react'; const FormLayout = (props: any, onSubmit: any) => ( diff --git a/apps/web/components/StyledElements/Modal/Modal.tsx b/apps/web/components/StyledElements/Modal/Modal.tsx index f30f9752..6c5584d7 100644 --- a/apps/web/components/StyledElements/Modal/Modal.tsx +++ b/apps/web/components/StyledElements/Modal/Modal.tsx @@ -2,7 +2,7 @@ import React from 'react'; import * as Dialog from '@radix-ui/react-dialog'; import { styled, keyframes } from '@stitches/react'; -import { violet, blackA, mauve, green } from '@radix-ui/colors'; +import { blackA, mauve } from '@radix-ui/colors'; import { ButtonBlack } from '../Form/Form'; type ModalParams = { diff --git a/apps/web/package-lock.json b/apps/web/package-lock.json index bac37a39..fd75f064 100644 --- a/apps/web/package-lock.json +++ b/apps/web/package-lock.json @@ -15,7 +15,7 @@ "@radix-ui/react-icons": "^1.1.1", "@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-tooltip": "^1.0.5", - "@sentry/nextjs": "^7.92.0", + "@sentry/nextjs": "^7.93.0", "@stitches/react": "^1.2.8", "@tiptap/extension-code-block-lowlight": "^2.1.11", "@tiptap/extension-collaboration": "^2.0.0-beta.199", @@ -61,6 +61,7 @@ "autoprefixer": "^10.4.14", "eslint": "^8.43.0", "eslint-config-next": "^13.5.1", + "eslint-plugin-unused-imports": "^3.0.0", "postcss": "^8.4.23", "tailwindcss": "^3.3.2", "typescript": "5.1.3" @@ -3299,42 +3300,57 @@ "dev": true }, "node_modules/@sentry-internal/feedback": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.92.0.tgz", - "integrity": "sha512-/jEALRtVqboxB9kcK2tag8QCO6XANTlGBb9RV3oeGXJe0DDNJXRq6wVZbfgztXJRrfgx4XVDcNt1pRVoGGG++g==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.100.0.tgz", + "integrity": "sha512-SMW2QhNKOuSjw8oPtvryDlJjiwrNyAKljbgtMk057os/fd8QMp38Yt1ImqLCM4B2rTQZ6REJ6hRGRTRcfqoG+w==", "dependencies": { - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@sentry-internal/replay-canvas": { + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.100.0.tgz", + "integrity": "sha512-DePinj5IgNiC4RZv0yX0DLccMZebfFdKl3zHwDeLBeZqtMz9VrPzchv57IWP+5MI1+iuOn+WOg4oTNBUG6hFRw==", + "dependencies": { + "@sentry/core": "7.100.0", + "@sentry/replay": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=12" } }, "node_modules/@sentry-internal/tracing": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.92.0.tgz", - "integrity": "sha512-ur55vPcUUUWFUX4eVLNP71ohswK7ZZpleNZw9Y1GfLqyI+0ILQUwjtzqItJrdClvVsdRZJMRmDV40Hp9Lbb9mA==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.100.0.tgz", + "integrity": "sha512-qf4W1STXky9WOQYoPSw2AmCBDK4FzvAyq5yeD2sLU7OCUEfbRUcN0lQljUvmWRKv/jTIAyeU5icDLJPZuR50nA==", "dependencies": { - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/browser": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.92.0.tgz", - "integrity": "sha512-loMr02/zQ38u8aQhYLtIBg0i5n3ps2e3GUXrt3CdsJQdkRYfa62gcrE7SzvoEpMVHTk7VOI4fWGht8cWw/1k3A==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.100.0.tgz", + "integrity": "sha512-XpM0jEVe6DJWXjMSOjtJxsSNR/XnJKrlcuyoI4Re3qLG+noEF5QLc0r3VJkySXPRFnmdW05sLswQ6a/n9Sijmg==", "dependencies": { - "@sentry-internal/feedback": "7.92.0", - "@sentry-internal/tracing": "7.92.0", - "@sentry/core": "7.92.0", - "@sentry/replay": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@sentry-internal/feedback": "7.100.0", + "@sentry-internal/replay-canvas": "7.100.0", + "@sentry-internal/tracing": "7.100.0", + "@sentry/core": "7.100.0", + "@sentry/replay": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=8" @@ -3361,25 +3377,25 @@ } }, "node_modules/@sentry/core": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.92.0.tgz", - "integrity": "sha512-1Tly7YB2I1byI5xb0Cwrxs56Rhww+6mQ7m9P7rTmdC3/ijOzbEoohtYIUPwcooCEarpbEJe/tAayRx6BrH2UbQ==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.100.0.tgz", + "integrity": "sha512-eWRPuP0Zdj4a2F7SybqNjf13LGOVgGwvW6sojweQp9oxGAfCPp/EMDGBhlpYbMJeLbzmqzJ4ZFHIedaiEC+7kg==", "dependencies": { - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/integrations": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.92.0.tgz", - "integrity": "sha512-9OT4i9b0Ge5sP3rCV8yYqoPp3BKcB9wjddW7sG0w88va32F0UWMKk4gmprtwgPYM0+u5AS/TTAVichRVRj+I1Q==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.100.0.tgz", + "integrity": "sha512-aO9wgnqlbav7FECKNcgTxQSGGSsMeYH9mV0cniuu520cDAhmVxtA+PqlnS3nsJZJj4cKjX6MWA2SbBG0szKmkw==", "dependencies": { - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0", + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0", "localforage": "^1.8.1" }, "engines": { @@ -3387,18 +3403,18 @@ } }, "node_modules/@sentry/nextjs": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-7.92.0.tgz", - "integrity": "sha512-gHLB06EwLWIxI4VdNADw3RaSokc+YKKLrG/RH8PrfWczCa2v5uQgzxWwKNYuViSGH/MBxZhpKGIZimjIkpOlBw==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-7.100.0.tgz", + "integrity": "sha512-kFQSUoiaqQvrJoEoFciHyHHhVdi2fxo9H0f/J3zKYa9fVwCDaK59mq2IHESPOtgf9uCdF0v2vRpER+1zANJUJw==", "dependencies": { "@rollup/plugin-commonjs": "24.0.0", - "@sentry/core": "7.92.0", - "@sentry/integrations": "7.92.0", - "@sentry/node": "7.92.0", - "@sentry/react": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0", - "@sentry/vercel-edge": "7.92.0", + "@sentry/core": "7.100.0", + "@sentry/integrations": "7.100.0", + "@sentry/node": "7.100.0", + "@sentry/react": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0", + "@sentry/vercel-edge": "7.100.0", "@sentry/webpack-plugin": "1.21.0", "chalk": "3.0.0", "resolve": "1.22.8", @@ -3420,28 +3436,28 @@ } }, "node_modules/@sentry/node": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.92.0.tgz", - "integrity": "sha512-LZeQL1r6kikEoOzA9K61OmMl32/lK/6PzmFNDH6z7UYwQopCZgVA6IP+CZuln8K2ys5c9hCyF7ICQMysXfpNJA==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.100.0.tgz", + "integrity": "sha512-8cf9wFNo/9I++60MVAf6tuKn/N5JCZ/Z8NDUzutnWWdQBLSx+LhZYNPntN3WkHl6Q7PBHGw3mU1Bc+rF48MeSQ==", "dependencies": { - "@sentry-internal/tracing": "7.92.0", - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0", - "https-proxy-agent": "^5.0.0" + "@sentry-internal/tracing": "7.100.0", + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/react": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.92.0.tgz", - "integrity": "sha512-lTvrLuvxtGEZbkW6NHru03K6eyixKyBliwiLwO+k37FK7Ha8Bwat2m77weyizWCdQ6DKlVazJNppkNeAlACIvQ==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.100.0.tgz", + "integrity": "sha512-IveXfTHUx9/fk4VvIL3htfmU4rynYHl+7R44UExbKcLOmUffgi6FscmI1otdd3tQvTE0OH85vCP6+ZR6kQgHQw==", "dependencies": { - "@sentry/browser": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0", + "@sentry/browser": "7.100.0", + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0", "hoist-non-react-statics": "^3.3.2" }, "engines": { @@ -3452,47 +3468,47 @@ } }, "node_modules/@sentry/replay": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.92.0.tgz", - "integrity": "sha512-G1t9Uvc9cR8VpNkElwvHIMGzykjIKikb10n0tfVd3e+rBPMCCjCPWOduwG6jZYxcvCjTpqmJh6NSLXxL/Mt4JA==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.100.0.tgz", + "integrity": "sha512-6Yo56J+x+eedaMXri8pPlFxXOofnSXVdsUuFj+kJ7lC/qHrwIbgC5g1ONEK/WlYwpVH4gA0aNnCa5AOkMu+ZTg==", "dependencies": { - "@sentry-internal/tracing": "7.92.0", - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@sentry-internal/tracing": "7.100.0", + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=12" } }, "node_modules/@sentry/types": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.92.0.tgz", - "integrity": "sha512-APmSOuZuoRGpbPpPeYIbMSplPjiWNLZRQa73QiXuTflW4Tu/ItDlU8hOa2+A6JKVkJCuD2EN6yUrxDGSMyNXeg==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.100.0.tgz", + "integrity": "sha512-c+RHwZwpKeBk7h8sUX4nQcelxBz8ViCojifnbEe3tcn8O15HOLvZqRKgLLOiff3MoErxiv4oxs0sPbEFRm/IvA==", "engines": { "node": ">=8" } }, "node_modules/@sentry/utils": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.92.0.tgz", - "integrity": "sha512-3nEfrQ1z28b/2zgFGANPh5yMVtgwXmrasZxTvKbrAj+KWJpjrJHrIR84r9W277J44NMeZ5RhRW2uoDmuBslPnA==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.100.0.tgz", + "integrity": "sha512-LAhZMEGq3C125prZN/ShqeXpRfdfgJkl9RAKjfq8cmMFsF7nsF72dEHZgIwrZ0lgNmtaWAB83AwJcyN83RwOxQ==", "dependencies": { - "@sentry/types": "7.92.0" + "@sentry/types": "7.100.0" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/vercel-edge": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/vercel-edge/-/vercel-edge-7.92.0.tgz", - "integrity": "sha512-iUmYjFj5ze/k9B06HmLZ/2JGhaf/tmjd0foz3pSbMyKbql6TTnybIwG+gcg+ukcek5mB82288Fh+mWXoUUkMIg==", + "version": "7.100.0", + "resolved": "https://registry.npmjs.org/@sentry/vercel-edge/-/vercel-edge-7.100.0.tgz", + "integrity": "sha512-5qIGnYF2Xlcr3QEHm+agcjBbXf2+eOw82j0o5gF4QjPJGDwghSfDqlt5r7DLJLA4hqgFUtE1uMRsDYGzwCsqPA==", "dependencies": { - "@sentry-internal/tracing": "7.92.0", - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@sentry-internal/tracing": "7.100.0", + "@sentry/core": "7.100.0", + "@sentry/types": "7.100.0", + "@sentry/utils": "7.100.0" }, "engines": { "node": ">=8" @@ -5580,6 +5596,36 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.0.0.tgz", + "integrity": "sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==", + "dev": true, + "dependencies": { + "eslint-rule-composer": "^0.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^6.0.0", + "eslint": "^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, + "node_modules/eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", diff --git a/apps/web/package.json b/apps/web/package.json index 1deadc16..2b9548b2 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "lint:fix": "eslint --fix ." }, "dependencies": { "@radix-ui/colors": "^0.1.8", @@ -62,6 +63,7 @@ "autoprefixer": "^10.4.14", "eslint": "^8.43.0", "eslint-config-next": "^13.5.1", + "eslint-plugin-unused-imports": "^3.0.0", "postcss": "^8.4.23", "tailwindcss": "^3.3.2", "typescript": "5.1.3" diff --git a/apps/web/services/ai/ai.ts b/apps/web/services/ai/ai.ts index a3b8e871..0344567f 100644 --- a/apps/web/services/ai/ai.ts +++ b/apps/web/services/ai/ai.ts @@ -1,5 +1,5 @@ import { getAPIUrl } from "@services/config/config"; -import { RequestBody, RequestBodyWithAuthHeader } from "@services/utils/ts/requests"; +import { RequestBody } from "@services/utils/ts/requests"; export async function startActivityAIChatSession(message: string, activity_uuid: string) { const data = { diff --git a/apps/web/services/blocks/Quiz/quiz.ts b/apps/web/services/blocks/Quiz/quiz.ts index 60e921ed..83d19de8 100644 --- a/apps/web/services/blocks/Quiz/quiz.ts +++ b/apps/web/services/blocks/Quiz/quiz.ts @@ -1,5 +1,5 @@ import { getAPIUrl } from "@services/config/config"; -import { RequestBody, RequestBodyForm } from "@services/utils/ts/requests"; +import { RequestBody } from "@services/utils/ts/requests"; export async function submitQuizBlock(activity_id: string, data: any) { diff --git a/apps/web/services/courses/chapters.ts b/apps/web/services/courses/chapters.ts index 6782c967..23f1207d 100644 --- a/apps/web/services/courses/chapters.ts +++ b/apps/web/services/courses/chapters.ts @@ -1,6 +1,6 @@ import { OrderPayload } from "@components/Dashboard/Course/EditCourseStructure/EditCourseStructure"; import { getAPIUrl } from "@services/config/config"; -import { RequestBody, RequestBodyWithAuthHeader, errorHandling } from "@services/utils/ts/requests"; +import { RequestBody, errorHandling } from "@services/utils/ts/requests"; /* This file includes only POST, PUT, DELETE requests diff --git a/apps/web/services/organizations/invites.ts b/apps/web/services/organizations/invites.ts index 8d90fb6f..256cb612 100644 --- a/apps/web/services/organizations/invites.ts +++ b/apps/web/services/organizations/invites.ts @@ -1,5 +1,5 @@ import { getAPIUrl } from "@services/config/config"; -import { RequestBody, errorHandling, getResponseMetadata } from "@services/utils/ts/requests"; +import { RequestBody, getResponseMetadata } from "@services/utils/ts/requests"; export async function createInviteCode(org_id: any) { const result = await fetch(`${getAPIUrl()}orgs/${org_id}/invites`, RequestBody("POST", null, null)); diff --git a/apps/web/services/utils/react/middlewares/views.ts b/apps/web/services/utils/react/middlewares/views.ts index 24692d01..1baaa64a 100644 --- a/apps/web/services/utils/react/middlewares/views.ts +++ b/apps/web/services/utils/react/middlewares/views.ts @@ -1,5 +1,4 @@ import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; -import { NextRouter } from "next/router"; export const denyAccessToUser = (error: any, router: AppRouterInstance) => { if (error.status === 401) {