Refactor recent projects into it's own cell (#558)

This commit was merged in pull request #558.
This commit is contained in:
Kurt Hutten
2021-10-16 03:35:44 +11:00
committed by GitHub
parent dc92920481
commit 55917395b4
6 changed files with 66 additions and 77 deletions

View File

@@ -27,30 +27,19 @@ export const QUERY = gql`
export const Loading = () => <div>Loading...</div>
export const Empty = ({ isMinimal = false }) => {
return !isMinimal ? (
<div className="rw-text-center">
{'No projects yet. '}
<Link to={routes.draftProject()} className="rw-link">
{'Create one?'}
</Link>
</div>
) : (
<p className="text-ch-gray-400">None yet!</p>
)
export const Empty = () => {
return <div className="rw-text-center">{'No projects yet.'}</div>
}
export const Success = ({
projects,
variables: { shouldFilterProjectsWithoutImage, projectLimit },
isMinimal = false,
}) => {
return (
<Projects
projects={projects}
shouldFilterProjectsWithoutImage={shouldFilterProjectsWithoutImage}
projectLimit={projectLimit}
isMinimal={isMinimal}
/>
)
}