diff --git a/src/components/home/HomeFeed.tsx b/src/components/home/HomeFeed.tsx
index c2129726..2a42f83a 100644
--- a/src/components/home/HomeFeed.tsx
+++ b/src/components/home/HomeFeed.tsx
@@ -412,7 +412,9 @@ export const HomeFeed = ({ type }: { type?: FeedType }) => {
}}
>
- {feed.isFetching && feed.hasNextPage && !isServerSide && }
+ {feed.isFetching && feed.hasNextPage && !isServerSide() && (
+
+ )}
)}
diff --git a/src/components/home/HomeSidebar.tsx b/src/components/home/HomeSidebar.tsx
index 7614f6da..aee21c72 100644
--- a/src/components/home/HomeSidebar.tsx
+++ b/src/components/home/HomeSidebar.tsx
@@ -1,22 +1,17 @@
-"use client"
-
-import { useState } from "react"
-
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
import { SearchInput } from "~/components/common/SearchInput"
import { Avatar } from "~/components/ui/Avatar"
import { UniLink } from "~/components/ui/UniLink"
import { getSiteLink } from "~/lib/helpers"
-import { useTranslation } from "~/lib/i18n/client"
-import { useGetShowcase } from "~/queries/home"
+import { getTranslation } from "~/lib/i18n"
+import { getShowcase } from "~/queries/home.server"
import { FollowAllButton } from "../common/FollowAllButton"
+import ShowMoreContainer from "./ShowMoreContainer"
-export function HomeSidebar({ hideSearch }: { hideSearch?: boolean }) {
- const showcaseSites = useGetShowcase()
- const { t } = useTranslation("index")
-
- const [showcaseMore, setShowcaseMore] = useState(false)
+export async function HomeSidebar({ hideSearch }: { hideSearch?: boolean }) {
+ const showcaseSites = await getShowcase()
+ const { t } = await getTranslation("index")
return (
@@ -25,60 +20,47 @@ export function HomeSidebar({ hideSearch }: { hideSearch?: boolean }) {
{t("Suggested creators for you")}
s.characterId)
.filter(Boolean)
.map(Number)}
- siteIds={showcaseSites.data?.map(
- (s: { handle: string }) => s.handle,
- )}
+ siteIds={showcaseSites?.map((s: { handle: string }) => s.handle)}
/>
- {showcaseSites.isLoading && {t("Loading")}...
}
-
+
+
+
+ {site?.metadata?.content?.name}
+
+ {site?.metadata?.content?.bio && (
+
+ {site.metadata.content?.bio}
+
+ )}
+
+
+
+ ))}
+ >
+
diff --git a/src/components/home/ShowMoreContainer.tsx b/src/components/home/ShowMoreContainer.tsx
new file mode 100644
index 00000000..aa92e5fe
--- /dev/null
+++ b/src/components/home/ShowMoreContainer.tsx
@@ -0,0 +1,32 @@
+"use client"
+
+import { useState } from "react"
+
+import { useTranslation } from "~/lib/i18n/client"
+
+export default function ShowMoreContainer({
+ children,
+}: {
+ children: JSX.Element
+}) {
+ const [showcaseMore, setShowcaseMore] = useState(false)
+ const { t } = useTranslation("index")
+
+ return (
+
+ )
+}
diff --git a/src/queries/home.server.ts b/src/queries/home.server.ts
index 4c56493c..136aa3bd 100644
--- a/src/queries/home.server.ts
+++ b/src/queries/home.server.ts
@@ -24,12 +24,11 @@ export const prefetchGetFeed = async (
})
}
-export const prefetchGetShowcase = async (queryClient: QueryClient) => {
- const key = ["getShowcase"]
- await queryClient.fetchQuery(key, async () => {
- return cacheGet({
- key,
- getValueFun: () => homeModel.getShowcase(),
- })
- })
+export const getShowcase = async () => {
+ return cacheGet({
+ key: "getShowcase",
+ noUpdate: true,
+ expireTime: 10 * 60,
+ getValueFun: () => homeModel.getShowcase(),
+ }) as Promise>
}