Skip to content

Commit

Permalink
fix(GuildInfiniteScroll): use the useFetcherWithSign hook
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Jul 11, 2024
1 parent 7d168b9 commit ddc9b5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/explorer/_components/GuildInfiniteScroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import { Spinner } from "@phosphor-icons/react"
import useUser from "components/[guild]/hooks/useUser"
import { env } from "env"
import { useFetcherWithSign } from "hooks/useFetcherWithSign"
import { useScrollBatchedRendering } from "hooks/useScrollBatchedRendering"
import { PrimitiveAtom, useAtomValue } from "jotai"
import { memo, useRef } from "react"
import { SWRConfiguration, useSWRConfig } from "swr"
import { SWRConfiguration } from "swr"
import useSWRInfinite from "swr/infinite"
import { GuildBase } from "types"
import { fetcherWithSign } from "utils/fetcher"
import {
GuildCardSkeleton,
GuildCardWithLink,
Expand All @@ -28,11 +28,11 @@ const GuildCards = ({ guildData }: { guildData?: GuildBase[] }) => {

const useExploreGuilds = (searchParams: URLSearchParams) => {
const { isSuperAdmin } = useUser()
const fetcherWithSign = useFetcherWithSign()
const options: SWRConfiguration = {
dedupingInterval: 60_000,
}

const { cache } = useSWRConfig()
// sending authed request for superAdmins, so they can see unverified & hideFromExplorer guilds too
// @ts-expect-error TODO: resolve this type error
return useSWRInfinite<GuildBase[]>(
Expand Down

0 comments on commit ddc9b5a

Please sign in to comment.