-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/green-line-map
- Loading branch information
Showing
3 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React from 'react'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { faTrophy } from '@fortawesome/free-solid-svg-icons'; | ||
import type { BusRoute } from '../../types/lines'; | ||
|
||
const WINNERS: { [key in number]: { pokey: BusRoute; schleppie: BusRoute } } = { | ||
2024: { | ||
pokey: '1', | ||
schleppie: '1', | ||
}, | ||
}; | ||
|
||
interface PokeySchleppieAwardBannerProps { | ||
busRoute: BusRoute | undefined; | ||
} | ||
|
||
export const PokeySchleppieAwardBanner: React.FunctionComponent<PokeySchleppieAwardBannerProps> = ({ | ||
busRoute, | ||
}) => { | ||
const years = Object.keys(WINNERS); | ||
|
||
if (!busRoute) { | ||
return null; | ||
} | ||
|
||
return years.map((year) => { | ||
const pokey = WINNERS[year].pokey === busRoute; | ||
const schleppie = WINNERS[year].schleppie === busRoute; | ||
|
||
if (!pokey && !schleppie) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div | ||
key={year} | ||
className="flex items-center overflow-hidden rounded bg-gradient-to-r from-[#f5B400] to-[#fcefcb] px-6 py-2.5" | ||
> | ||
<div className="flex w-full gap-x-4 gap-y-2"> | ||
<FontAwesomeIcon | ||
icon={faTrophy} | ||
size={'2x'} | ||
className="text-white shadow-gray-500 text-shadow" | ||
/> | ||
<div className="flex w-full items-center justify-between"> | ||
<p className="text-md w-full leading-6 text-white shadow-gray-500 text-shadow"> | ||
"Winner" of the {year}{' '} | ||
{pokey && schleppie | ||
? 'Pokey and Schleppie' | ||
: pokey | ||
? 'Pokey' | ||
: schleppie | ||
? 'Schleppie' | ||
: null}{' '} | ||
Award{pokey && schleppie ? 's' : ''}! | ||
</p> | ||
<a | ||
href="https://drive.google.com/file/d/1QFTVg0N3-uQeVoMqlOE6QLPqcoCtifzp/view" | ||
target="_blank" | ||
className="flex-none rounded-full bg-gray-900 px-3.5 py-1 text-sm font-semibold text-white shadow-sm hover:bg-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900" | ||
rel="noreferrer" | ||
> | ||
Read more <span aria-hidden="true">→</span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters