Skip to content

Commit

Permalink
Merge pull request #519 from nwplus/nwhacks2025_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
martincai8 authored Nov 28, 2024
2 parents 5526baa + 54f55b0 commit 4b1cd08
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sections/Sponsors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ const Sponsors = () => {
const data = await fireDb.getCollection('nwHacks2025', 'Sponsors')
if (data) {
setSponsors(data)
setCarouselSponsors(data.filter(child => child.blurb !== undefined && child.blurb !== ''))
const filteredCarouselSponsors = data.filter(child => child.blurb !== undefined && child.blurb !== '')
const tierOrder = ['title', 'platinum', 'gold', 'silver', 'bronze', 'startup', 'inkind']
const sortedCarouselSponsors = filteredCarouselSponsors.sort((a, b) => {
return tierOrder.indexOf(a.tier) - tierOrder.indexOf(b.tier)
})
setCarouselSponsors(sortedCarouselSponsors)
}
}, [])

Expand Down

0 comments on commit 4b1cd08

Please sign in to comment.