diff --git a/src/components/UIUC-Components/LargeDropzone.tsx b/src/components/UIUC-Components/LargeDropzone.tsx index ebdce9216..cdfa51649 100644 --- a/src/components/UIUC-Components/LargeDropzone.tsx +++ b/src/components/UIUC-Components/LargeDropzone.tsx @@ -77,11 +77,18 @@ export function LargeDropzone({ // console.log("in LargeDropzone.tsx ALL emailAddresses: ", user?.emailAddresses ) const refreshOrRedirect = async (redirect_to_gpt_4: boolean) => { + if (is_new_course) { + // refresh current page + await new Promise((resolve) => setTimeout(resolve, 200)) + router.push(`/${courseName}/materials`) + return + } + if (redirect_to_gpt_4) { router.push(`/${courseName}/chat`) } // refresh current page - await new Promise((resolve) => setTimeout(resolve, 700)) + await new Promise((resolve) => setTimeout(resolve, 200)) router.reload() } const uploadToS3 = async (file: File | null, uniqueFileName: string) => { diff --git a/src/components/UIUC-Components/MakeNewCoursePage.tsx b/src/components/UIUC-Components/MakeNewCoursePage.tsx index 630122cf5..ee6bf4ed6 100644 --- a/src/components/UIUC-Components/MakeNewCoursePage.tsx +++ b/src/components/UIUC-Components/MakeNewCoursePage.tsx @@ -1,26 +1,6 @@ import Head from 'next/head' -// import { -// Card, -// Text, -// Flex, -// Group, -// Checkbox, -// Col, -// Paper, -// Input, -// Textarea, -// FileInput, -// MediaQuery, -// type CheckboxProps, -// Title, -// } from '@mantine/core' - import React, { useState } from 'react' -// import GlobalHeader from './GlobalHeader' -// import GlobalFooter from './GlobalFooter' -// import EmailChipsComponent from './EmailChipsComponent' -// import { type CourseMetadata } from '~/types/courseMetadata' -// import LargeDropzone from './LargeDropzone' + import PlainNavbar from '~/components/UIUC-Components/navbars/PlainNavbar' import { useMediaQuery } from '@mantine/hooks' import EditCourseCard from '~/components/UIUC-Components/EditCourseCard' @@ -32,15 +12,6 @@ const MakeNewCoursePage = ({ course_name: string current_user_email: string }) => { - const [introMessage, setIntroMessage] = useState('') - const [courseName, setCourseName] = useState(course_name || '') - const [isCourseAvailable, setIsCourseAvailable] = useState< - boolean | undefined - >(undefined) - const [allExistingCourseNames, setAllExistingCourseNames] = useState< - string[] - >([]) - const isSmallScreen = useMediaQuery('(max-width: 960px)') return ( <> @@ -49,7 +20,7 @@ const MakeNewCoursePage = ({