Skip to content

Commit

Permalink
try fix format check
Browse files Browse the repository at this point in the history
  • Loading branch information
AmiyaSX committed Sep 18, 2024
1 parent 1d3d2ad commit 46995fb
Show file tree
Hide file tree
Showing 12 changed files with 257 additions and 251 deletions.
14 changes: 7 additions & 7 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/* doesnt seem to work */
@layer components {
.maplibregl-popup-content {
padding: 0;
}
.maplibregl-ctrl-attrib {
display: none !important;
}
}
.maplibregl-popup-content {
padding: 0;
}
.maplibregl-ctrl-attrib {
display: none !important;
}
}
132 changes: 66 additions & 66 deletions src/app/student/_components/ExhibitorDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,70 +13,70 @@ export default function ExhibitorDetails({
}: {
exhibitor: Exhibitor
}) {
const hasIndustries = exhibitor.industries?.length > 0
const hasEmployments = exhibitor.employments?.length > 0
return (
<div className="@container">
<div className="flex flex-col-reverse items-center gap-6 @sm:h-[100px] @sm:flex-row">
{(exhibitor.logo_squared || exhibitor.logo_freesize) && (
<Image
className="h-20 w-auto object-contain @sm:h-full @sm:min-w-28 @sm:max-w-[25%]"
src={exhibitor.logo_squared ?? exhibitor.logo_freesize ?? ""}
alt={exhibitor.name}
width={300}
height={300}
/>
)}
<div className="flex flex-col items-center @sm:ml-2 @sm:block">
<Page.Header className="text-center @sm:text-start">
{exhibitor.name}
</Page.Header>
{exhibitor.company_website && (
<div className="mt-2 flex items-center gap-1 text-base font-semibold text-stone-400 ">
<Globe size={16} />
<Link
rel="noopener noreferrer"
target="_blank"
href={exhibitor.company_website}
className="line-clamp-1 transition-colors hover:text-emerald-100/90 hover:underline">
{exhibitor.company_website}
</Link>
</div>
)}
</div>
</div>
{exhibitor.about && (
<P className="mt-8 border-t border-stone-500 pt-4">{exhibitor.about}</P>
)}
<div
className={cn("mt-10 grid grid-cols-1", {
"gap-5 md:grid-cols-2": hasIndustries && hasEmployments
})}>
{hasIndustries && (
<div>
<Page.Header tier="secondary" className="mt-2 pl-1">
Industries
</Page.Header>
<BadgeCollection
className="mt-2 flex-wrap gap-2"
items={exhibitor.industries}
maxDisplayed={20}
/>
</div>
)}
{hasEmployments && (
<div>
<Page.Header tier="secondary" className="mt-2 pl-1">
Employments
</Page.Header>
<BadgeCollection
className="mt-2 gap-2"
items={exhibitor.employments}
maxDisplayed={20}
/>
</div>
)}
</div>
</div>
)
const hasIndustries = exhibitor.industries?.length > 0
const hasEmployments = exhibitor.employments?.length > 0
return (
<div className="@container">
<div className="flex flex-col-reverse items-center gap-6 @sm:h-[100px] @sm:flex-row">
{(exhibitor.logo_squared || exhibitor.logo_freesize) && (
<Image
className="h-20 w-auto object-contain @sm:h-full @sm:min-w-28 @sm:max-w-[25%]"
src={exhibitor.logo_squared ?? exhibitor.logo_freesize ?? ""}
alt={exhibitor.name}
width={300}
height={300}
/>
)}
<div className="flex flex-col items-center @sm:ml-2 @sm:block">
<Page.Header className="text-center @sm:text-start">
{exhibitor.name}
</Page.Header>
{exhibitor.company_website && (
<div className="mt-2 flex items-center gap-1 text-base font-semibold text-stone-400 ">
<Globe size={16} />
<Link
rel="noopener noreferrer"
target="_blank"
href={exhibitor.company_website}
className="line-clamp-1 transition-colors hover:text-emerald-100/90 hover:underline">
{exhibitor.company_website}
</Link>
</div>
)}
</div>
</div>
{exhibitor.about && (
<P className="mt-8 border-t border-stone-500 pt-4">{exhibitor.about}</P>
)}
<div
className={cn("mt-10 grid grid-cols-1", {
"gap-5 md:grid-cols-2": hasIndustries && hasEmployments
})}>
{hasIndustries && (
<div>
<Page.Header tier="secondary" className="mt-2 pl-1">
Industries
</Page.Header>
<BadgeCollection
className="mt-2 flex-wrap gap-2"
items={exhibitor.industries}
maxDisplayed={20}
/>
</div>
)}
{hasEmployments && (
<div>
<Page.Header tier="secondary" className="mt-2 pl-1">
Employments
</Page.Header>
<BadgeCollection
className="mt-2 gap-2"
items={exhibitor.employments}
maxDisplayed={20}
/>
</div>
)}
</div>
</div>
)
}
26 changes: 13 additions & 13 deletions src/app/student/exhibitors/_components/ExhibitorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ export function ExhibitorCard({ exhibitor }: { exhibitor: Exhibitor }) {
else setModalOpen(false)
}, [exhibitor, searchParams])

return (
<>
<Modal
open={modalOpen}
setOpen={setModalOpen}
onClose={() => {
router.push("/student/exhibitors", { scroll: false })
}}
className="max-w-[1000px] bg-gradient-to-br from-emerald-950 via-stone-900 to-stone-900 p-0">
<div className="sm:p-10 p-4">
<ExhibitorDetails exhibitor={exhibitor} />
</div>
</Modal>
return (
<>
<Modal
open={modalOpen}
setOpen={setModalOpen}
onClose={() => {
router.push("/student/exhibitors", { scroll: false })
}}
className="max-w-[1000px] bg-gradient-to-br from-emerald-950 via-stone-900 to-stone-900 p-0">
<div className="p-4 sm:p-10">
<ExhibitorDetails exhibitor={exhibitor} />
</div>
</Modal>

<Link href={`/student/exhibitors?id=${exhibitor.id}`} scroll={false}>
<div className="to-liqorice-950 group relative flex h-full flex-col rounded-lg border-2 border-solid border-emerald-900 bg-gradient-to-b from-emerald-900 via-emerald-950 filter transition hover:scale-[1.05] hover:brightness-95">
Expand Down
52 changes: 26 additions & 26 deletions src/app/student/map/_components/BoothMarker.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
"use client"

import Image from "next/image";
import { Marker } from "react-map-gl/maplibre";
import { Booth } from "../lib/booths";
import Image from "next/image"
import { Marker } from "react-map-gl/maplibre"
import { Booth } from "../lib/booths"

export function BoothMarker({ booth, scale }: { booth: Booth; scale: number }) {
const logoSrc = booth.exhibitor.logo_squared ?? booth.exhibitor.logo_freesize
return (
<Marker
key={booth.id}
longitude={booth.center[0]}
latitude={booth.center[1]}>
<div className="cursor-default" style={{ transform: `scale(${scale})` }}>
{logoSrc ? (
<div className="size-[60px] flex" >
<Image
className="my-auto"
src={logoSrc}
alt={booth.exhibitor.name}
width={300}
height={300}></Image>
</div>
) : (
<span className="text-black">{booth.exhibitor.name}</span>
)}
</div>
</Marker>
)
}
const logoSrc = booth.exhibitor.logo_squared ?? booth.exhibitor.logo_freesize
return (
<Marker
key={booth.id}
longitude={booth.center[0]}
latitude={booth.center[1]}>
<div className="cursor-default" style={{ transform: `scale(${scale})` }}>
{logoSrc ? (
<div className="flex size-[60px]">
<Image
className="my-auto"
src={logoSrc}
alt={booth.exhibitor.name}
width={300}
height={300}></Image>
</div>
) : (
<span className="text-black">{booth.exhibitor.name}</span>
)}
</div>
</Marker>
)
}
24 changes: 12 additions & 12 deletions src/app/student/map/_components/BoothPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { Popup } from "react-map-gl/maplibre"
import { Booth } from "../lib/booths"

export function BoothPopup({ booth }: { booth: Booth }) {
return (
<div>
<Popup
key={booth.id}
anchor="bottom"
longitude={booth.center[0]}
latitude={booth.center[1]}
closeButton={false}>
<div className="text-black ">{booth.exhibitor.name}</div>
</Popup>
</div>
)
return (
<div>
<Popup
key={booth.id}
anchor="bottom"
longitude={booth.center[0]}
latitude={booth.center[1]}
closeButton={false}>
<div className="text-black ">{booth.exhibitor.name}</div>
</Popup>
</div>
)
}
Loading

0 comments on commit 46995fb

Please sign in to comment.