From fd42f5ca547ed94436e24003ec5cf358e44457ae Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 10 Jul 2025 19:11:14 +0800 Subject: [PATCH] feat: simplify ssr footer --- apps/ssr/client/modules/login/index.tsx | 5 +- apps/ssr/client/pages/(login)/register.tsx | 2 + .../components/src/common/PoweredByFooter.tsx | 194 +++--------------- 3 files changed, 38 insertions(+), 163 deletions(-) diff --git a/apps/ssr/client/modules/login/index.tsx b/apps/ssr/client/modules/login/index.tsx index f8145d1a3..be2cff199 100644 --- a/apps/ssr/client/modules/login/index.tsx +++ b/apps/ssr/client/modules/login/index.tsx @@ -4,6 +4,7 @@ import { openInFollowApp } from "@client/lib/helper" import { queryClient } from "@client/lib/query-client" import { useSession } from "@client/query/auth" import { useAuthProviders } from "@client/query/users" +import { Logo } from "@follow/components/icons/logo.jsx" import { Button, MotionButtonBase } from "@follow/components/ui/button/index.js" import { Divider } from "@follow/components/ui/divider/index.js" import { @@ -232,8 +233,10 @@ export function Login() { return (
+ + {!isAuthenticated && !isLoading && ( -

+

{t("login.logInTo")} {` ${APP_NAME}`}

)} diff --git a/apps/ssr/client/pages/(login)/register.tsx b/apps/ssr/client/pages/(login)/register.tsx index 983c9e456..1be575dcb 100644 --- a/apps/ssr/client/pages/(login)/register.tsx +++ b/apps/ssr/client/pages/(login)/register.tsx @@ -2,6 +2,7 @@ import { useServerConfigs } from "@client/atoms/server-configs" import { loginHandler, signUp } from "@client/lib/auth" import { ReferralForm } from "@client/modules/referral" import { useAuthProviders } from "@client/query/users" +import { Logo } from "@follow/components/icons/logo.jsx" import { Button, MotionButtonBase } from "@follow/components/ui/button/index.jsx" import { Divider } from "@follow/components/ui/divider/index.js" import { @@ -29,6 +30,7 @@ import { z } from "zod" export function Component() { return (
+
) diff --git a/packages/internal/components/src/common/PoweredByFooter.tsx b/packages/internal/components/src/common/PoweredByFooter.tsx index 696c32fc7..190cd1d55 100644 --- a/packages/internal/components/src/common/PoweredByFooter.tsx +++ b/packages/internal/components/src/common/PoweredByFooter.tsx @@ -1,178 +1,48 @@ import { cn } from "@follow/utils/utils" -import { Folo } from "../icons/folo" -import { Logo } from "../icons/logo" - -interface FooterLink { - href: string - label: string - external?: boolean -} - -interface FooterSection { - title: string - links: FooterLink[] -} - -const footerSections: FooterSection[] = [ - { - title: "Product", - links: [ - { href: "https://folo.is", label: "Home", external: true }, - { href: "https://github.com/RSSNext/folo", label: "GitHub", external: true }, - { href: "https://github.com/RSSNext/folo/releases", label: "Download", external: true }, - ], - }, - { - title: "Community", - links: [ - { href: "https://github.com/RSSNext/folo/issues", label: "Issues", external: true }, - { - href: "https://discord.gg/followapp", - label: "Discord", - external: true, - }, - { href: "https://x.com/folo_is", label: "Twitter", external: true }, - ], - }, - { - title: "Resources", - links: [ - { - href: "https://github.com/RSSNext/folo/blob/main/CONTRIBUTING.md", - label: "Contributing", - external: true, - }, - { - href: "https://github.com/RSSNext/folo/blob/main/CODE_OF_CONDUCT.md", - label: "Code of Conduct", - external: true, - }, - ], - }, -] - -const socialLinks = [ - { - href: "https://github.com/RSSNext/follow", - label: "GitHub", - icon: "i-simple-icons-github", - }, - { - href: "https://twitter.com/folo_is", - label: "Twitter", - icon: "i-simple-icons-x", - }, - { - href: "https://discord.gg/followapp", - label: "Discord", - icon: "i-simple-icons-discord", - }, -] - export const PoweredByFooter: Component = ({ className }) => (