Skip to content

Commit

Permalink
teachers_timetable click_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zain-ul-din committed May 4, 2023
1 parent ff690e3 commit 9181e0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/TeachersTimetableSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import { motion } from "framer-motion"

import { ROUTING } from "~/lib/constant"
import Link from "next/link"
import { useRouter } from "next/router"

export default function TeacherTimetableSelection (
{ teachers } : { teachers: Array<string> }
)
{
const router = useRouter()
const [filterTeachers, setFilterTeachers] = useState<Array<string>>(teachers.sort())
const [searchQuery, setSearchQuery] = useState<string>('');

Expand Down Expand Up @@ -58,6 +60,7 @@ export default function TeacherTimetableSelection (
{filterTeachers
.map((val, key)=>{
return <Flex
onClick={(e)=> router.push(`${ROUTING.teachers}/${val}`)}
className="roboto"
key = {key}
bg= {'var(--card-color)'} py = {'0.5rem'} px= {'1rem'}
Expand All @@ -66,7 +69,6 @@ export default function TeacherTimetableSelection (
rounded={'sm'}
cursor={'pointer'}
>
<Link href = {`${ROUTING.teachers}/${val}`}>
<motion.div
initial = {{opacity: 0}}
animate = {{ opacity: 1}}
Expand All @@ -76,7 +78,6 @@ export default function TeacherTimetableSelection (
<LinkIcon/>
</Icon> {val}
</motion.div>
</Link>
</Flex>
})}
</Flex>
Expand Down

1 comment on commit 9181e0f

@vercel
Copy link

@vercel vercel bot commented on 9181e0f May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.