Skip to content

Commit

Permalink
sponsor section fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschonti committed Feb 5, 2024
1 parent 91893a5 commit 76f87c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/components/sponsors/sponsor-logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Company } from '@/models/models';
import clsx from 'clsx';

import { Company, SponsorCategory } from '@/models/models';

function ConditionalWrapper({
condition,
Expand All @@ -16,7 +18,7 @@ type Props = {
company: Company;
};

export function SponsorLogo({ company: { logoUrl, name, url } }: Props) {
export function SponsorLogo({ company: { logoUrl, name, url, category } }: Props) {
if (!logoUrl) {
return null;
}
Expand All @@ -30,7 +32,11 @@ export function SponsorLogo({ company: { logoUrl, name, url } }: Props) {
)}
>
<div className='relative p-2'>
<img src={logoUrl} alt={`${name} logo`} />
<img
src={logoUrl}
alt={`${name} logo`}
className={clsx(category === SponsorCategory.MAIN_SPONSOR ? '' : 'max-h-[75px]', 'mx-auto')}
/>
</div>
</ConditionalWrapper>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/sponsors/sponsor-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function SponsorSection({ sectionTitle, companies }: Props) {
{featuredSponsors.map(
(c) =>
c.logoUrl && (
<div key={c.name} className='col-span-2 h-auto max-w-[200px] w-full'>
<div key={c.name} className='col-span-2 h-auto max-w-[200px] w-full max-h-[75px]'>
<SponsorLogo company={c} />
</div>
)
Expand All @@ -45,7 +45,7 @@ export function SponsorSection({ sectionTitle, companies }: Props) {
<h3 className='text-3xl'>További támogatóink</h3>
<div className={styles.containerMany}>
{regularSponsors.map((c) => (
<div key={c.name} className='col-span-2 h-auto max-w-[170px] w-full'>
<div key={c.name} className='col-span-2 h-auto max-w-[170px] w-full max-h-[75px]'>
<SponsorLogo company={c} />
</div>
))}
Expand Down

0 comments on commit 76f87c2

Please sign in to comment.