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

fix: hide functions list if package has no functions #122

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

ben-brooker
Copy link
Contributor

Small ui fix to remove the functions section if there aren't any functions in the package. I think it looks cleaner. (readme will be fixed once merged)

Before:
Screenshot 2022-07-07 at 13 29 21
After:
Screenshot 2022-07-07 at 13 29 33

@ben-brooker ben-brooker requested a review from ztsorojev July 7, 2022 12:32
@@ -154,6 +158,8 @@ export const getServerSideProps: GetServerSideProps = async ({
);
const metadata = await res.json();

console.log({topics: metadata.topics})
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this log

packageVersion={metadata.version}
/>
{
metadata.topics.length > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
metadata.topics.length > 0
metadata.topics?.length > 0

Copy link
Contributor

@ztsorojev ztsorojev left a comment

Choose a reason for hiding this comment

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

Tiny fixes and it's good to go!

Copy link
Contributor

@ztsorojev ztsorojev left a comment

Choose a reason for hiding this comment

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

👍

@ben-brooker ben-brooker merged commit f2fc76c into main Jul 11, 2022
@ben-brooker ben-brooker deleted the bb/no-functions branch July 11, 2022 14:52
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