Skip to content

Commit

Permalink
feat: add anchor to schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ginifizz committed Sep 16, 2024
1 parent eec7a45 commit 5676dd9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Overline from "components/con/common/typography/Overline";
import styles from "./ScheduleDay.module.css";
import classNames from "classnames";
import { LanguageContext } from "contexts/con/LanguageContext";
import { slugify } from "utils";

function ExtraSlotItem({ conference }: { conference: ExtraConference }) {
const { locale } = useContext(LanguageContext);
Expand Down Expand Up @@ -89,11 +90,15 @@ export default function ScheduleDay({
return acc;
}, [] as string[]);

const daySlug = slugify(day.title?.[locale] || '');

return day ? (
<div className="mb-14 last:mb-0" key={day.title?.[locale]}>
<a id={daySlug} href={`#${daySlug}`} className='block -mt-24 pt-24'>
<h2 className="text-white font-title text-4xl font-bold">
{day.title?.[locale]}
</h2>
</a>
<Overline className="text-white/80 py-2">
{" "}
{getConferenceDate(day.date)}
Expand Down

0 comments on commit 5676dd9

Please sign in to comment.