Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create page for when you have no projects #8285

Merged
merged 7 commits into from
Sep 27, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Sep 27, 2024

This adds a front end fallback screen for when you have no projects.

image

Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 7:51am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Sep 27, 2024 7:51am

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do this transformation in three different places now, so I thought it would be about time to break it out into a shared component.

Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Comment on lines +219 to +228
{noProjects ? (
<ContentGridNoProjects
owners={[{ ownerType: 'system' }]}
admins={[
{ name: 'admin' },
{
name: 'Christopher Tompkins',
imageUrl:
'https://avatars.githubusercontent.com/u/1010371?v=4',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire bit is largely just wrapping the old content in a ternary. we'll probably sort this out with the union type down the road, but this makes it work right now.

@@ -106,7 +81,7 @@ export const ProjectOwners: FC<IProjectOwnersProps> = ({ owners = [] }) => {
<StyledOwnerName>
<StyledHeader data-loading>Owner</StyledHeader>
<StyledUserName data-loading>
{users[0]?.name}
{getOwnerName(owners[0])}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if owners is an empty array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing happens as before; we show "system"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rather: before, we wouldn't show anything (but theoretically it should never be empty). Now we show "system"

@thomasheartman thomasheartman merged commit 6655b2d into main Sep 27, 2024
10 of 11 checks passed
@thomasheartman thomasheartman deleted the feat/1-2861-viewer-onboarding-message branch September 27, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants