Skip to content

Commit

Permalink
bring main sponsor to front
Browse files Browse the repository at this point in the history
  • Loading branch information
Sámuel Fekete committed Feb 27, 2024
1 parent 78c1a3a commit c4ed9c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/presentations/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { notFound } from 'next/navigation';

import { Tile } from '@/components/tiles/tile';
import { getIndexData } from '@/models/get-index-data';
import { SponsorCategory } from '@/models/models';
import slugify from '@/utils/slugify';

export const metadata: Metadata = {
Expand All @@ -19,13 +20,17 @@ export default async function Presentations() {
notFound();
}
const presentations = data.presentations.sort((p1, p2) => p1.title.localeCompare(p2.title));
const [bosch] = presentations.splice(
presentations.findIndex((p) => p.presenter.company?.category === SponsorCategory.MAIN_SPONSOR),
1
);

return (
<div className='flex flex-col max-w-6xl w-full px-4 sm:px-6 xl:px-0'>
<h1 className='mb-16 mt-8'>Előadások</h1>

<div className='grid grid-cols-1 xs:grid-cols-2 lg:grid-cols-3 gap-8'>
{presentations.map((presentation) => (
{[bosch, ...presentations].map((presentation) => (
<Tile key={presentation.title} clickable>
<Tile.Body lessPadding='[1px]'>
<div className='flex flex-col h-full'>
Expand Down

0 comments on commit c4ed9c9

Please sign in to comment.