Skip to content

chore: remove the link if the author is not available #169

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

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

lucas-datacamp
Copy link
Contributor

Proposal

This pull request proposes an update to the PackageSidebar component to enhance the handling of the maintainer's information. The changes introduce a new state to track the availability of the maintainer and update the UI accordingly.

Context

Following the end of Depsy back in 2018, there is no new data incoming - meaning any authors published after March 2018 will throw a 404 on the collaborator/maintainer page on rdocs.

@lucas-datacamp lucas-datacamp marked this pull request as ready for review December 31, 2024 12:35
@@ -70,6 +72,14 @@ export default function PackageSidebar({
router.push(`/packages/${packageName}/versions/${selectedVersion}`);
}

useEffect(() => {
Copy link
Contributor

@Joachimzeelmaekers Joachimzeelmaekers Dec 31, 2024

Choose a reason for hiding this comment

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

You could extract this as a hook which you can test like eg useHasCollaborator which returns a boolean. That way you can test the hook in isolation, and have a single-purpose hook for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

needs unit test setup. creating a ticket for it

@lucas-datacamp lucas-datacamp merged commit 3c57082 into master Dec 31, 2024
3 checks passed
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.

None yet

2 participants