Skip to content

Commit

Permalink
added updates
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelgeek committed Apr 22, 2024
1 parent 332b8ae commit e7b85ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ import { EventTypes } from '../components/home/EventTypes'
import { Gallery } from '../components/home/Gallery'
import Organizers from '../components/home/Organizers'
import { Sponsor } from '../components/home/Sponsor'
import SponsorsList from '../components/home/SponsorsList'
import { Organizer, Sponsor as SponsorType } from '../types/types'
// import SponsorsList from '../components/home/SponsorsList'
// import { Organizer, Sponsor as SponsorType } from '../types/types'
import { Organizer } from '../types/types'
import axios from '../utils/axios'

interface HomeProps {
organizers: Organizer[]
sponsors: SponsorType[]
// sponsors: SponsorType[]
}

const Home: NextPage<HomeProps> = ({ organizers, sponsors }) => {
const Home: NextPage<HomeProps> = ({ organizers }) => {
return (
<div
className="bg-[length:0%] md:bg-[length:47%] bg-[top_340px_left_110%] md:bg-[top_100px_left_110%] bg-no-repeat"
Expand Down Expand Up @@ -52,7 +53,7 @@ const Home: NextPage<HomeProps> = ({ organizers, sponsors }) => {
</section>
<EventTypes />
<Sponsor />
<SponsorsList sponsors={sponsors} year={23} showSponsors />
{/* <SponsorsList sponsors={sponsors} year={23} showSponsors /> */}
<Gallery />
<Organizers organizers={organizers} />
</div>
Expand All @@ -66,14 +67,14 @@ export async function getServerSideProps() {
return response.data.data
})

const sponsors = await axios
.get(`/events/${process.env.NEXT_PUBLIC_EVENT_SLUG}/sponsors`)
.then((response) => {
return response.data.data
})
// const sponsors = await axios
// .get(`/events/${process.env.NEXT_PUBLIC_EVENT_SLUG}/sponsors`)
// .then((response) => {
// return response.data.data
// })

// Pass data to the page via props
return { props: { organizers, sponsors } }
return { props: { organizers } }
}

export default Home
2 changes: 1 addition & 1 deletion pages/sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default function SponsorsPage({ sponsors }: { sponsors: Sponsor[] }) {
</div>
</div>
</section>
<SponsorsList sponsors={sponsors} showSponsors year={23} />
<SponsorsList sponsors={sponsors} showSponsors={false} year={24} />
</div>
)
}
Expand Down

0 comments on commit e7b85ff

Please sign in to comment.