From fe2c6ab10aef0b0397f3ecf562ebc6c2bca69fd6 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 30 Jun 2023 22:54:07 +0100 Subject: [PATCH] feat: home page for mobile --- src/components/home/HomeFeed.tsx | 30 +++++++++++++++++------------ src/components/home/HomeSidebar.tsx | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/components/home/HomeFeed.tsx b/src/components/home/HomeFeed.tsx index 712332fb..fa1f11d2 100644 --- a/src/components/home/HomeFeed.tsx +++ b/src/components/home/HomeFeed.tsx @@ -19,6 +19,7 @@ import { Skeleton } from "~/components/ui/Skeleton" import { Tabs } from "~/components/ui/Tabs" import { Tooltip } from "~/components/ui/Tooltip" import { useDate } from "~/hooks/useDate" +import { useIsMobileLayout } from "~/hooks/useMobileLayout" import { DEFAULT_AVATAR } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" import { useTranslation } from "~/lib/i18n/client" @@ -44,12 +45,18 @@ const PostCard = ({ const router = useRouter() const { t } = useTranslation("common") const date = useDate() + const isMobileLayout = useIsMobileLayout() return ( -
-
+
+
{ e.preventDefault() window.open( @@ -73,18 +80,17 @@ const PostCard = ({ ) }} > - + {character?.handle - + {character?.metadata?.content?.name || character?.handle} @@ -93,7 +99,7 @@ const PostCard = ({ ยท