Skip to content

Commit

Permalink
fix: Search button
Browse files Browse the repository at this point in the history
A lot of small tweaks

Co-authored-by: Didrik Munther <[email protected]>
  • Loading branch information
hampfh and Didrik Munther committed Nov 17, 2024
1 parent 7796e02 commit 4758691
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
14 changes: 14 additions & 0 deletions src/app/student/_components/ExhibitorDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { P } from "@/app/_components/Paragraph"
import BadgeCollection from "@/app/student/exhibitors/_components/BadgeCollection"
import { Page } from "@/components/shared/Page"
Expand All @@ -7,6 +9,7 @@ import { cn } from "@/lib/utils"
import { Globe } from "lucide-react"
import Image from "next/image"
import Link from "next/link"
import { useEffect, useState } from "react"

export default function ExhibitorDetails({
exhibitor
Expand All @@ -15,6 +18,17 @@ export default function ExhibitorDetails({
}) {
const hasIndustries = exhibitor.industries?.length > 0
const hasEmployments = exhibitor.employments?.length > 0

const [show, setShow] = useState(false)

useEffect(() => {
setTimeout(() => {
setShow(true)
})
}, [])

if (!show) return null

return (
<div className="pb-5 @container">
<div className="flex flex-col-reverse items-center gap-6 @sm:h-[100px] @sm:flex-row">
Expand Down
19 changes: 12 additions & 7 deletions src/app/student/map/_components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import {
ChevronsRight,
EraserIcon,
FilterIcon,
ListIcon,
MapIcon,
SearchIcon,
X,
XIcon
} from "lucide-react"
Expand Down Expand Up @@ -115,7 +115,7 @@ export default function Sidebar({
}
return (
<SidebarContainer open={open} setOpen={setOpen} smallScreen={smallScreen}>
<div className="h-[calc(80dvh-28px)] p-2">
<div className="p-2">
<Button variant="ghost" onClick={() => setActiveDrawerBoothId(null)}>
<ArrowLeft size={30} />
</Button>
Expand Down Expand Up @@ -280,11 +280,16 @@ function SidebarContainer({
direction={"bottom"}
onClose={() => setOpen(false)}>
{createPortal(
<DrawerTrigger className="absolute bottom-2 right-2 z-10">
<Button className="flex gap-2" variant={"outline"}>
<ListIcon size={15} /> All exhibitors
</Button>
</DrawerTrigger>,
<div className="absolute bottom-0 z-10 flex h-20 w-screen items-center justify-center border-t-[1px] border-stone-700/80 bg-stone-950">
<DrawerTrigger className="w-full px-5">
<Button
className="text-md flex w-full gap-2 py-6"
size={"lg"}
variant={"secondary"}>
<SearchIcon size={16} /> Search Exhibitors
</Button>
</DrawerTrigger>
</div>,
document.getElementById("root")!
)}
<DrawerContent
Expand Down

0 comments on commit 4758691

Please sign in to comment.