Place hero.jpg in /stickers with safeguards

This commit is contained in:
Sam Poder 2022-02-21 15:09:42 +08:00
parent 6ea8d82f93
commit 5481e1536c
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ const StickersPage = ({ stickers = [] }) => [
width={2732}
height={1821}
alt="Students exchanging stickers"
src="/sticker-exchange.jpg"
src="/stickers/hero.jpg"
gradient
/>
<Card
@ -190,6 +190,6 @@ export default StickersPage
export const getStaticProps = () => {
const stickersDir = path.join(process.cwd(), 'public', 'stickers')
const stickers = fs.readdirSync(stickersDir)
const stickers = fs.readdirSync(stickersDir).filter(sticker => sticker != "hero.jpg")
return { props: { stickers } }
}

View file

Before

Width:  |  Height:  |  Size: 546 KiB

After

Width:  |  Height:  |  Size: 546 KiB