diff --git a/src/components/projects/ListProjects.jsx b/src/components/projects/ListProjects.jsx index a3486b8..021208f 100644 --- a/src/components/projects/ListProjects.jsx +++ b/src/components/projects/ListProjects.jsx @@ -57,25 +57,10 @@ function TableHeader({ classes }) { ) } -function ListProjects() { - const classes = useStyles() +function TableRows({ profiles, classes }) { const { cellText, cellColor, nameSpacer } = classes - const { loading, error, data } = useQuery(getProjects) - if (loading) return - if (error) return
{`Error! ${error.message}`}
- const { profiles } = data return ( -
- - Liquid Funding - - - Fund. Build. Together. - - - All Projects - - + {profiles.map((profile, i) => { const { id, profileId, creationTime, projectInfo: { title, subtitle, goal, goalToken, creator }, pledgesInfos } = profile const cellStyling = isOdd(i) ? classnames(cellText) : classnames(cellText, classes.cellColor) @@ -97,6 +82,29 @@ function ListProjects() { ) })} + + ) +} + +function ListProjects() { + const classes = useStyles() + const { loading, error, data } = useQuery(getProjects) + if (loading) return + if (error) return
{`Error! ${error.message}`}
+ const { profiles } = data + return ( +
+ + Liquid Funding + + + Fund. Build. Together. + + + All Projects + + +