Skip to content

Commit

Permalink
Updated facilities/index.js getServerSideProps
Browse files Browse the repository at this point in the history
  • Loading branch information
ertush committed Oct 4, 2024
1 parent e318567 commit f8e19d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pages/facilities/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function FacilityHome(props) {
const router = useRouter()


console.log({props})


// const facilities = props?.data?.results
const filters = props?.filters
Expand Down Expand Up @@ -1376,7 +1376,7 @@ export async function getServerSideProps(ctx) {

let url = nextURL ?? previousURL ?? defaultURL

// const filters = await fetchFilters(token)
const filters = await fetchFilters(token)

// console.log({filters})

Expand Down Expand Up @@ -1432,7 +1432,7 @@ export async function getServerSideProps(ctx) {



console.log({ url })
// console.log({ url })

facilities = (await (await fetch(url, {
headers: {
Expand Down Expand Up @@ -1464,7 +1464,7 @@ export async function getServerSideProps(ctx) {
facilities: facilities?.results ?? null,
next: facilities?.next ?? null,
previous: facilities?.previous ?? null,
filters: await fetchFilters(token),
filters,
path: ctx.asPath || '/facilities',
current_url,
current_page: facilities?.current_page ?? null,
Expand Down

0 comments on commit f8e19d2

Please sign in to comment.