-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
18 additions
and
40 deletions.
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 |
---|---|---|
@@ -1,55 +1,35 @@ | ||
import Link from 'next/link'; | ||
|
||
import { IndexPageData } from '@/models/models'; | ||
|
||
async function getIndexData(): Promise<IndexPageData> { | ||
const res = await fetch(`${process.env.BACKEND_URL}/conference/index`); | ||
if (!res.ok) { | ||
throw new Error(res.status.toString()); | ||
} | ||
return res.json(); | ||
} | ||
import { getIndexData } from '@/models/get-index-data'; | ||
|
||
export default async function asyncontact() { | ||
const { organisers } = await getIndexData(); | ||
// TODO sort by priority | ||
const a = organisers.sort((o) => o.priority); | ||
const org = [ | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
...organisers, | ||
]; | ||
const sortedOrganizers = organisers.sort((o) => o.priority); | ||
|
||
return ( | ||
<div className='flex flex-col'> | ||
<h1 className='mb-[74px]'>Kapcsolat</h1> | ||
<div className='flex flex-col px-6 xl:px-0'> | ||
<h1 className='mb-16 mt-8'>Kapcsolat</h1> | ||
|
||
<Link | ||
href='mailto:[email protected]' | ||
className='my-8 text-xl sm:text-2xl md:text-3xl font-semibold text-center hover:text-brand' | ||
target='blank' | ||
> | ||
[email protected] | ||
</Link> | ||
|
||
<div className='grid grid-cols-1 md:grid-cols-2 2xl:grid-cols-3 gap-16'> | ||
{org.map((organiser) => ( | ||
{sortedOrganizers.map((organiser) => ( | ||
<div className='w-[384px]'> | ||
<img src={organiser.pictureUrl} className='rounded-t-[30px] w-full h-[384px]' /> | ||
<div className='rounded-b-[30px] pt-[18px] px-[49px] pb-[38px] grid grid-cols-1 gap-2 bg-[#101010]'> | ||
<div className='rounded-b-[30px] pt-4 px-3 pb-9 grid grid-cols-1 gap-2 bg-[#101010]'> | ||
<h2 className='text-center text-3xl font-bold'>{organiser.name}</h2> | ||
<p className='text-center text-2xl'>{organiser.rank}</p> | ||
<p className='text-center text-base text-[#FFE500]'>{organiser.emailAddress}</p> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
<Link | ||
href='mailto:[email protected]' | ||
className='mt-8 text-xl sm:text-2xl md:text-3xl font-semibold text-center hover:text-brand' | ||
target='blank' | ||
> | ||
[email protected] | ||
</Link> | ||
</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
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