Closed epoll31 closed 4 months ago
@epoll31 is attempting to deploy a commit to the SyntaxUI Team on Vercel.
A member of the Team first needs to authorize it.
useRouter() is better in this case as it doesn't performs page-reload when doing client-side transitions
you can read more here: https://blog.logrocket.com/next-js-routechangestart-router-events/
@Ansub I am under the impression that 'Link' also does not perform a full page reload in v14 according to their docs
Either way, we should probably still rename the button something besides DiscordButton
I will close this PR though :)
Link also does the same thing, if you see the link of the docs you shared, it says:
to provide prefetching and client-side navigation between routes
Then should we use <Link prefetch={false}>
? This way we are still using a link for SEO and general best practices?
Then should we use
<Link prefetch={false}>
? This way we are still using a link for SEO and general best practices?
how will disabling prefetch a best practice, enlighten me please.
prefetching is done so that other page id already fetched to reduce load time when going to next page. making it false will disable the behaviour and then it will act just like an a tag.
I thought that was what you were recommending.
I am confused as to what useRouter
does better than Link
in this case.
You mentioned that useRouter
doesn't perform a full-page reload, but I think that Link
also doesn't perform a full-page reload.
I thought that was what you were recommending.
I am confused as to what
useRouter
does better thanLink
in this case.You mentioned that
useRouter
doesn't perform a full-page reload, but I think thatLink
also doesn't perform a full-page reload.
yes both does the same thing
So should we switch it to a Link
? I can open a new PR that is directed to main since this branch is now closed.
let's work on other stuff, this is not a deal breaker, both does the same work so it doesn't matter
Description
I fixed the homepage button that says 'Get Portfolio Template'
Proposed Changes
DiscordButton
toTemplatesButton
useRouter
navigation onClick in favor of a normalLink
with apassHref
to amotion.a
/templates
because the original pr removed the/templates/minimal-portfolio
pathChecklist
Please check the boxes that apply:
main
branch.npm run build
and build is successful