diff --git a/src/pages/explorer.tsx b/src/pages/explorer.tsx deleted file mode 100644 index 10a7d73c0c..0000000000 --- a/src/pages/explorer.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import { useYourGuilds } from "@/hooks/useYourGuilds" -import { useBreakpointValue, useColorModeValue } from "@chakra-ui/react" -import ClientOnly from "components/common/ClientOnly" -import Layout from "components/common/Layout" -import LinkPreviewHead from "components/common/LinkPreviewHead" -import ExploreAllGuilds from "components/explorer/ExploreAllGuilds" -import ExplorerTabs from "components/explorer/ExplorerTabs" -import GoToCreateGuildButton from "components/explorer/GoToCreateGuildButton" -import YourGuilds from "components/explorer/YourGuilds" -import useScrollRestoration from "components/explorer/hooks/useScrollRestoration" -import { atom, useAtom } from "jotai" -import { GetStaticProps } from "next" -import { useRef } from "react" -import { GuildBase } from "types" -import fetcher from "utils/fetcher" - -type Props = { - guilds: GuildBase[] -} - -export const explorerScrollRestorationAtom = atom(true) - -const Page = ({ guilds: guildsInitial }: Props): JSX.Element => { - const yourGuildsRef = useRef(null) - const allGuildsRef = useRef(null) - - const { data: usersGuilds } = useYourGuilds() - - const bgColor = useColorModeValue("var(--chakra-colors-gray-800)", "#37373a") // dark color is from whiteAlpha.200, but without opacity so it can overlay the banner image - const bgOpacity = useColorModeValue(0.06, 0.1) - const bgLinearPercentage = useBreakpointValue({ base: "50%", sm: "55%" }) - const [shouldRestoreScroll, setShouldRestoreScroll] = useAtom( - explorerScrollRestorationAtom - ) - - useScrollRestoration({ - active: shouldRestoreScroll, - onRestore: () => setShouldRestoreScroll(true), - }) - - return ( - <> - - - - } - /> - - - - - - - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const guilds = await fetcher(`/v2/guilds?sort=members`).catch((_) => []) - - return { - props: { guilds }, - revalidate: 300, - } -} - -export default Page