+
+
+ {features.map((feature) => (
+
+ {t(feature.title)}
+ {t(".")}
+
+ ))}
+
+
+
+ xLog is the best{" "}
+
+ on-chain
+ {" "}
+ and{" "}
+
+ open-source
+ {" "}
+ blogging community for everyone.
+
+
+
+
+
-
-
-
- {features.map((feature, index) => (
-
-
-
-
- {index + 1}
-
-
- {t(feature.title)}
-
-
- {t(`features.${feature.title}.subtitle`)}
-
-
+ onClick={() => {
+ setShowcaseMore(true)
+ }}
+ >
+ {t("Look at others'")}
+
+
+
+
+
+ {t("Explore the xLog way")}
+
+
+
+
+
+ {features.map((feature, index) => (
+
+
+
+
+ {index + 1}
+
+
+ {t(feature.title)}
+
+
+ {t(`features.${feature.title}.subtitle`)}
+
+
+
+ .
+
+ ),
+ }}
+ ns="index"
+ />
+
+
+
+ {feature.subfeatures.map((item, index) => (
+ -
+ {item.screenshot?.src && (
+
+
+
+ )}
+
+ {item.icon}
+
+ {t(item.title)}
+
+
+
,
+ axfm: (
.
@@ -373,238 +415,188 @@ export default function Home() {
ns="index"
/>
+
+ ))}
+
+ {feature.extra && (
+
+
+ 🤫{" "}
+
+ {t(`features.${feature.title}.extra.title`)}
+
-
- {feature.subfeatures.map((item, index) => (
- -
- {item.screenshot?.src && (
-
-
-
- )}
-
- {item.icon}
-
- {t(item.title)}
-
-
-
- ,
- axfm: (
-
- .
-
- ),
- }}
- ns="index"
- />
-
-
- ))}
-
- {feature.extra && (
-
-
- 🤫{" "}
-
- {t(`features.${feature.title}.extra.title`)}
-
-
-
- {t(`features.${feature.title}.extra.description`)}
-
-
-
- )}
-
- ))}
-
-
-
- {t("Showcase")}
-
-
-
- {t(
- "Discover these awesome teams and creators on xLog (sorted by update time)",
- )}
-
-
-
-
-
-
-
- {t("Integration")}
-
-
-
- {t(
- "xLog's open design allows it to integrate with many other open protocols and applications without friction.",
- )}
-
-
- {integrations.map((item, index) => (
- -
- {item.url ? (
-
-
- {item.icon}
-
-
- {item.name}
-
-
- ) : (
-
-
-
- {item.icon}
-
-
- {item.name}
-
-
-
- )}
-
- ))}
- -
-
-
-
-
-
-
-
-
-
+ {t(`features.${feature.title}.extra.button`)}
+
+
+ )}
- {isConnected ? (
-
-
-
- ) : (
-
- )}
+ ))}
+
+
+
+ {t("Showcase")}
+
+
+ {t(
+ "Discover these awesome teams and creators on xLog (sorted by update time)",
+ )}
+
+
+
+
+
+
+
+ {t("Integration")}
+
+
+
+ {t(
+ "xLog's open design allows it to integrate with many other open protocols and applications without friction.",
+ )}
+
+
+ {integrations.map((item, index) => (
+ -
+ {item.url ? (
+
+
+ {item.icon}
+
+
+ {item.name}
+
+
+ ) : (
+
+
+
+ {item.icon}
+
+
+ {item.name}
+
+
+
+ )}
+
+ ))}
+ -
+
+
+
+
+
+
+
+
+
-
-
+ {isConnected ? (
+
+
+
+ ) : (
+
+ )}
+
+
)
}
+
+Home.getLayout = (page: ReactElement) => {
+ return
{page}
+}
+
+export default Home
diff --git a/src/queries/home.ts b/src/queries/home.ts
new file mode 100644
index 00000000..fa3242b3
--- /dev/null
+++ b/src/queries/home.ts
@@ -0,0 +1,20 @@
+import { useInfiniteQuery } from "@tanstack/react-query"
+
+import * as homeModel from "~/models/home.model"
+
+export const useGetFeed = (data?: {
+ type?: "latest" | "recommend" | "following"
+ characterId?: number
+ limit?: number
+}) => {
+ return useInfiniteQuery({
+ queryKey: ["getFeed", data],
+ queryFn: async ({ pageParam }) => {
+ return homeModel.getFeed({
+ ...data,
+ cursor: pageParam,
+ })
+ },
+ getNextPageParam: (lastPage) => lastPage?.cursor || undefined,
+ })
+}