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(website): dev experience and use Link #364

Merged
merged 8 commits into from
Jan 12, 2024
Merged

Conversation

dai-shi
Copy link
Owner

@dai-shi dai-shi commented Jan 11, 2024

  • remove unused packages
  • fix optimizeDeps
  • use <Link>
  • fix --with-ssr

Copy link

vercel bot commented Jan 11, 2024

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

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Jan 12, 2024 2:57am

Copy link

codesandbox-ci bot commented Jan 11, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ce60aa2:

Sandbox Source
Vanilla Typescript Configuration
React Configuration
React TypeScript Configuration

@dai-shi dai-shi changed the title fix(website): dev experience and so on fix(website): dev experience and use Link Jan 11, 2024
@dai-shi dai-shi marked this pull request as ready for review January 11, 2024 13:14
@dai-shi dai-shi mentioned this pull request Jan 11, 2024
4 tasks

if (link.href.startsWith('http')) {
Element = 'a';
props.target = '_blank';
props.rel = 'noopener noreferrer';
props.href = link.href;
} else {
props.to = link.href;
Copy link
Contributor

Choose a reason for hiding this comment

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

to is a required parameter, and this will cause error if it's empty

if (!to.startsWith('/')) {
throw new Error('Link must start with "/"');
}

Copy link
Contributor

Choose a reason for hiding this comment

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

No never mind, I missed your Element = 'a'; on the top

Copy link
Contributor

Choose a reason for hiding this comment

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

But reduce any types would help for reading

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, I agree. It's not very readable.

@dai-shi dai-shi merged commit bef56a9 into main Jan 12, 2024
28 checks passed
@dai-shi dai-shi deleted the chore/website/unused branch January 12, 2024 03:32
@dai-shi
Copy link
Owner Author

dai-shi commented Jan 12, 2024

Oh, no. I didn't notice this error...

image

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