hackclub / jams

We're jamming!
https://jams.hackclub.com
36 stars 72 forks source link

Fix search bar breaking landing page #166

Closed nebudev14 closed 1 year ago

nebudev14 commented 1 year ago

Was checking out the Jams website and noticed the search bar on the landing page crashes when any input is given to it.

Lines 518-530 on index.js seem to be the root issue, where jam doesn't exist.

searchLunr(query, props.jamsContent.batches.filter(batch => {

        if (batch.keywords.split(', ').includes('Beta')) {
          return false
        }
        if (
          !selectedCategories.some(keyword =>
            batch.keywords.split(', ').includes(keyword)
          ) &&
          selectedCategories != ''
        ) {
          return false
        }
}

Based on the code from the same file in lines 479-516, I'm assuming this was just a keyword mistake and they meant to check batch instead of jam. I've changed it in this pull request.

vercel[bot] commented 1 year ago

@NebuDev14 is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.