1
0
Fork 0

fix(org): Fixed links in footer

This commit is contained in:
Joost De Cock 2022-06-05 13:24:41 +02:00
parent 9088439f7b
commit f6882e5a39
2 changed files with 9 additions and 6 deletions

View file

@ -266,7 +266,7 @@ const Footer = ({ app }) => {
<Worm list={contributors.map(item => ({ <Worm list={contributors.map(item => ({
img: item.avatar_url, img: item.avatar_url,
title: item.name, title: item.name,
slug: item.profile href: item.profile
}))} /> }))} />
</div> </div>
@ -277,7 +277,7 @@ const Footer = ({ app }) => {
<Worm list={patrons.map(item => ({ <Worm list={patrons.map(item => ({
img: item.img, img: item.img,
title: item.name, title: item.name,
slug: item.username slug: `/users/${item.username}`
}))} /> }))} />
</div> </div>

View file

@ -1,6 +1,8 @@
import Link from 'next/link' import Link from 'next/link'
const PreviewTile = ({ img, slug, title }) => ( const linkClasses = "w-12 h-12 md:w-14 md:h-14 xl:w-20 xl:h-20 inline-block"
const PreviewTile = ({ img, slug, title, href=false }) => (
<div <div
style={{ backgroundImage: `url(${img})`, backgroundSize: 'cover' }} style={{ backgroundImage: `url(${img})`, backgroundSize: 'cover' }}
className={` className={`
@ -11,9 +13,10 @@ const PreviewTile = ({ img, slug, title }) => (
mb-2 xl:mb-4 mb-2 xl:mb-4
`} `}
> >
<Link href={`/showcase/${slug}`}> {href
<a className="w-12 h-12 block" title={title}/> ? <a href={href} title={title} className={linkClasses}/>
</Link> : <Link href={slug}><a title={title} className={linkClasses}/></Link>
}
</div> </div>
) )