From 0ffdb8219f5eaf6af0d875850004b530c85390a9 Mon Sep 17 00:00:00 2001 From: Web Dev Cody Date: Fri, 2 Feb 2024 16:03:59 -0500 Subject: [PATCH] adding blank state followers page --- public/followers.svg | 1 + src/app/following/page.tsx | 64 +++++++++++++++++++++++++++----------- 2 files changed, 47 insertions(+), 18 deletions(-) create mode 100644 public/followers.svg diff --git a/public/followers.svg b/public/followers.svg new file mode 100644 index 0000000..857d63e --- /dev/null +++ b/public/followers.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/following/page.tsx b/src/app/following/page.tsx index f6c93a7..f0f4a1c 100644 --- a/src/app/following/page.tsx +++ b/src/app/following/page.tsx @@ -5,6 +5,8 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { useQuery } from "convex/react"; import { api } from "../../../convex/_generated/api"; import Link from "next/link"; +import Image from "next/image"; +import { Button } from "@/components/ui/button"; export default function PeersPage() { const { isAuthenticated } = useSession(); @@ -16,24 +18,50 @@ export default function PeersPage() { return (
-

Who You Follow

- -
- {peers?.map((peer) => { - return ( - -
- - - CN - - -

{peer.name}

-
- - ); - })} -
+ {peers?.length === 0 && ( + <> +

+ Who You Follow +

+
+ no followers +
You have no followers
+ + +
+ + )} + + {peers && peers.length > 0 && ( + <> +

Who You Follow

+ +
+ {peers?.map((peer) => { + return ( + +
+ + + CN + + +

{peer.name}

+
+ + ); + })} +
+ + )}
); }