From be757181f40d849e34435e1288ee61865d2f8213 Mon Sep 17 00:00:00 2001 From: Brian Morrison II Date: Tue, 30 Apr 2024 16:17:00 -0400 Subject: [PATCH] profiles loading view --- src/app/profiles/page.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/profiles/page.tsx b/src/app/profiles/page.tsx index 5d25d86..2c552d8 100644 --- a/src/app/profiles/page.tsx +++ b/src/app/profiles/page.tsx @@ -3,14 +3,17 @@ import React, { useEffect, useState } from 'react' import { getPublicProfiles } from '../lib/actions' import { UserInfo } from '../lib/models' import UserProfileCard from '../lib/components/UserProfileCard' +import LoadingView from '../views/LoadingView' function Profiles() { const [profiles, setProfiles] = useState([]) + const [isLoading, setIsLoading] = useState(true) useEffect(() => { async function fetchData() { let p = await getPublicProfiles() setProfiles([...p]) + setIsLoading(false) } fetchData() }, []) @@ -19,6 +22,7 @@ function Profiles() {

Profiles

Members of our amazing community:
+ {isLoading && }
{profiles.map((p, i) => )}