diff --git a/src/app/(home)/activities/page.tsx b/src/app/(home)/activities/page.tsx index 20e2c99b..2d0b6e1f 100644 --- a/src/app/(home)/activities/page.tsx +++ b/src/app/(home)/activities/page.tsx @@ -3,11 +3,10 @@ import { Hydrate, dehydrate } from "@tanstack/react-query" import { HomeFeed } from "~/components/home/HomeFeed" import { HomeSidebar } from "~/components/home/HomeSidebar" import getQueryClient from "~/lib/query-client" -import { prefetchGetFeed, prefetchGetShowcase } from "~/queries/home.server" +import { prefetchGetFeed } from "~/queries/home.server" async function Activities() { const queryClient = getQueryClient() - await prefetchGetShowcase(queryClient) await prefetchGetFeed( { type: "latest", diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx index 66c3070a..68fac978 100644 --- a/src/app/(home)/layout.tsx +++ b/src/app/(home)/layout.tsx @@ -1,3 +1,5 @@ +import { Hydrate, dehydrate } from "@tanstack/react-query" + import { ConnectButton } from "~/components/common/ConnectButton" import { DarkModeSwitch } from "~/components/common/DarkModeSwitch" import { Logo } from "~/components/common/Logo" @@ -5,17 +7,20 @@ import HomeTabs from "~/components/home/HomeTabs" import { UniLink } from "~/components/ui/UniLink" import { APP_NAME, DISCORD_LINK, GITHUB_LINK, TWITTER_LINK } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" -import { useTranslation } from "~/lib/i18n" +import getQueryClient from "~/lib/query-client" +import { prefetchGetShowcase } from "~/queries/home.server" export default async function HomeLayout({ children, }: { children?: React.ReactNode }) { - const { t } = await useTranslation("index") + const queryClient = getQueryClient() + await prefetchGetShowcase(queryClient) + const dehydratedState = dehydrate(queryClient) return ( - <> +
- + ) } diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsx index c5061633..3c2888e4 100644 --- a/src/app/(home)/page.tsx +++ b/src/app/(home)/page.tsx @@ -1,8 +1,6 @@ import Link from "next/link" import { memo } from "react" -import { Hydrate, dehydrate } from "@tanstack/react-query" - import { Logo } from "~/components/common/Logo" import { default as OriginEntranceButton } from "~/components/home/EntranceButton" import { Integration } from "~/components/home/Integrations" @@ -12,14 +10,9 @@ import { Image } from "~/components/ui/Image" import { CSB_SCAN, GITHUB_LINK } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" import { Trans, useTranslation } from "~/lib/i18n" -import getQueryClient from "~/lib/query-client" -import { prefetchGetShowcase } from "~/queries/home.server" async function Home() { const { t, i18n } = await useTranslation("index") - const queryClient = getQueryClient() - await prefetchGetShowcase(queryClient) - const dehydratedState = dehydrate(queryClient) const EntranceButton = memo(function Button() { return ( @@ -115,237 +108,233 @@ async function Home() { ] return ( - -
-
-

- {features.map((feature) => ( - - {t(feature.title)} - {t(".")} - - ))} -

-

- - xLog is the best{" "} - - on-chain - {" "} - and{" "} - - open-source - {" "} - blogging community for everyone. - -

-
- - -
-
- {t("Explore the xLog way")} + {t(feature.title)} + {t(".")} + + ))} + +

+ + xLog is the best{" "} -

+ target="_blank" + rel="nofollow noreferrer" + className="underline decoration-2 text-yellow-400 font-medium" + href={CSB_SCAN} + > + on-chain + {" "} + and{" "} + + open-source + {" "} + blogging community for everyone. + + +
+ +
-
-
- {features.map((feature, index) => ( -
-
-
-
- {index + 1} -
-

- {t(feature.title)} -

-

- {t(`features.${feature.title}.subtitle`)} -

-

- - . - - ), - }} - ns="index" - /> -

+
+ {t("Explore the xLog way")} + +
+
+
+
+ {features.map((feature, index) => ( +
+
+
+
+ {index + 1}
-
    - {feature.subfeatures.map((item) => ( -
  • - {item.screenshot?.src && ( -
    - {item.title} -
    - )} -

    - {item.icon} - + {t(feature.title)} + +

    + {t(`features.${feature.title}.subtitle`)} +

    +

    + - {t(item.title)} - -

    -

    - , - axfm: ( - - . - - ), - aincentive: ( - - . - - ), - }} - ns="index" - /> -

    -
  • - ))} -
- {feature.extra && ( -
-
- 🤫{" "} + . + + ), + }} + ns="index" + /> +

+
+
    + {feature.subfeatures.map((item) => ( +
  • + {item.screenshot?.src && ( +
    + {item.title} +
    + )} +

    + {item.icon} - {t(`features.${feature.title}.extra.title`)} + {t(item.title)} -

-
- {t(`features.${feature.title}.extra.description`)} -
- - {t(`features.${feature.title}.extra.button`)} - -
- )} -
- ))} -
-
-
- {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.", - )} -

-
    - -
  • - -
  • +

    +

    + , + axfm: ( + + . + + ), + aincentive: ( + + . + + ), + }} + ns="index" + /> +

    + + ))}
+ {feature.extra && ( +
+
+ 🤫{" "} + + {t(`features.${feature.title}.extra.title`)} + +
+
{t(`features.${feature.title}.extra.description`)}
+ + {t(`features.${feature.title}.extra.button`)} + +
+ )}
+ ))} +
+
+
+ {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.", + )} +

+
    + +
  • + +
  • +
-
- +
+
+ +
+ +
+
) } diff --git a/src/app/(home)/search/page.tsx b/src/app/(home)/search/page.tsx index 98ce8299..58147d1b 100644 --- a/src/app/(home)/search/page.tsx +++ b/src/app/(home)/search/page.tsx @@ -1,30 +1,20 @@ -import { Hydrate, dehydrate } from "@tanstack/react-query" - import { SearchInput } from "~/components/common/SearchInput" import { HomeFeed } from "~/components/home/HomeFeed" import { HomeSidebar } from "~/components/home/HomeSidebar" -import getQueryClient from "~/lib/query-client" -import { prefetchGetShowcase } from "~/queries/home.server" async function Search() { - const queryClient = getQueryClient() - await prefetchGetShowcase(queryClient) - const dehydratedState = dehydrate(queryClient) - return ( - -
-
-
- -
- -
+
+
+
+ +
+
-
-
- + +
+
) }