Skip to content

Commit

Permalink
Fix loading states on user and feed page
Browse files Browse the repository at this point in the history
Relates #13 #103

Co-authored-by: Jack Heriz-Smith <[email protected]>
Co-authored-by: CampbellDocherty <[email protected]>
Co-authored-by: Alexreid95 <[email protected]>
  • Loading branch information
4 people committed May 27, 2020
1 parent 5ea26f5 commit 1bcff6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 2 additions & 3 deletions wip-app/src/pages/FeedPage/FeedPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect } from "react";
import { feedPage } from "../../utils/get-fetch";
// import { ProjectGrid } from "./FeedPage.style";
import ProjectFeed from "../../components/ProjectFeed/ProjectFeed";

const FeedPage = (props) => {
Expand All @@ -13,8 +12,8 @@ const FeedPage = (props) => {
return (
<>
<h1>Feed Page</h1>
{projects === [] ? (
<h2>Loading...</h2>
{projects.length === 0 ? (
<h2>Loading your feed...</h2>
) : (
<ProjectFeed projects={projects} />
)}
Expand Down
7 changes: 2 additions & 5 deletions wip-app/src/pages/UserPage/UserPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@ const UserPage = (props) => {
user_link_3,
} = userInfo;

console.log("userlink", user_link_1);

return (
<>
{userInfo === [] || userProjects === [] ? (
<h1>Loading...</h1>
{userInfo.length === 0 || userProjects.length === 0 ? (
<h1>Loading your profile...</h1>
) : (
// this is not rendering
<>
<ProfileCard>
<h1>{username}'s Profile</h1>
Expand Down

0 comments on commit 1bcff6c

Please sign in to comment.