diff --git a/src/app/(home)/components/Header.tsx b/src/app/(home)/components/Header.tsx deleted file mode 100644 index 89f149ca..00000000 --- a/src/app/(home)/components/Header.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { ConnectButton } from "~/components/common/ConnectButton" -import { Logo } from "~/components/common/Logo" -import { Image } from "~/components/ui/Image" -import { UniLink } from "~/components/ui/UniLink" -import { GITHUB_LINK } from "~/lib/env" -import { useTranslation } from "~/lib/i18n" -import { cn } from "~/lib/utils" - -const tabs = [ - { - name: "Home", - link: "/", - }, - { - name: "Activities", - link: "/activities", - }, - { - name: ( - github stars - ), - link: GITHUB_LINK, - }, -] - -export async function Header() { - const { t } = await useTranslation("index") - // const pathname = usePathname() - // TODO how to set active state for Link in RSC, - // make be client component and add activeClass props or some way else - const pathname = "/" - return ( -
-
- -
- -
- xLog -
-
- {tabs?.map((tab, index) => ( - - ))} - -
-
-
- ) -} diff --git a/src/app/(home)/components/Showcase.tsx b/src/app/(home)/components/Showcase.tsx index 7f105da6..ec51763c 100644 --- a/src/app/(home)/components/Showcase.tsx +++ b/src/app/(home)/components/Showcase.tsx @@ -1,12 +1,18 @@ "use client" -import { FollowAllButton } from "~/components/common/FollowAllButton" -import { useGetShowcase } from "~/queries/home" +import { useState } from "react" -import ShowcaseList from "./ShowcaseList" +import { CharacterFloatCard } from "~/components/common/CharacterFloatCard" +import { FollowAllButton } from "~/components/common/FollowAllButton" +import { Image } from "~/components/ui/Image" +import { UniLink } from "~/components/ui/UniLink" +import { getSiteLink } from "~/lib/helpers" +import { useGetShowcase } from "~/queries/home" export function ShowCase() { const showcaseSites = useGetShowcase() + const [showcaseMore, setShowcaseMore] = useState(false) + return ( <> s.handle)} /> - +
    +
    setShowcaseMore(true)} + > + {/* {t("Show more")} */} + Show more +
    + {showcaseSites.data?.map((site) => ( +
  • + + + + {site.handle} + + + + + {site.metadata?.content?.name} + + {site.metadata?.content?.bio && ( + + {site.metadata.content?.bio} + + )} + + +
  • + ))} +
) } diff --git a/src/app/(home)/components/ShowcaseList.tsx b/src/app/(home)/components/ShowcaseList.tsx deleted file mode 100644 index e2fb4241..00000000 --- a/src/app/(home)/components/ShowcaseList.tsx +++ /dev/null @@ -1,66 +0,0 @@ -"use client" - -import { CharacterEntity } from "crossbell.js" -import { useState } from "react" - -import { CharacterFloatCard } from "~/components/common/CharacterFloatCard" -import { Image } from "~/components/ui/Image" -import { UniLink } from "~/components/ui/UniLink" -import { getSiteLink } from "~/lib/helpers" - -export default function ShowcaseList({ sites }: { sites?: CharacterEntity[] }) { - const [showcaseMore, setShowcaseMore] = useState(false) - - return ( -
    -
    setShowcaseMore(true)} - > - {/* {t("Show more")} */} - Show more -
    - {sites?.map((site) => ( -
  • - - - - {site.handle} - - - - - {site.metadata?.content?.name} - - {site.metadata?.content?.bio && ( - - {site.metadata.content?.bio} - - )} - - -
  • - ))} -
- ) -} diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx index daba730b..9d2c85fe 100644 --- a/src/app/(home)/layout.tsx +++ b/src/app/(home)/layout.tsx @@ -1,19 +1,73 @@ +import { ConnectButton } from "~/components/common/ConnectButton" import { DarkModeSwitch } from "~/components/common/DarkModeSwitch" +import { Logo } from "~/components/common/Logo" +import { Image } from "~/components/ui/Image" 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 { cn } from "~/lib/utils" -import { Header } from "./components/Header" +const tabs = [ + { + name: "Home", + link: "/", + }, + { + name: "Activities", + link: "/activities", + }, + { + name: ( + github stars + ), + link: GITHUB_LINK, + }, +] export default async function HomeLayout({ children, }: { children?: React.ReactNode }) { + const { t } = await useTranslation("index") + return ( <> - {/* @ts-expect-error RSC */} -
+
+
+ +
+ +
+ xLog +
+
+ {tabs?.map((tab, index) => ( + + ))} + +
+
+
{children}