Closed lucasfp13 closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
faststore-site | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 6, 2024 1:17pm |
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.
Good job, @lucasfp13 ! The UX is way better, and keeping SSG :)
I noticed a little layout shift while redirecting, but it is not something to concern, that's a very specific case. screen-capture (1).webm
Yeah, I noticed the layout shift too 😞 It's something that I can think a solution for this in this PR, but if it takes longer I'll reassign this to another task
What's the purpose of this pull request?
This PR intends to fix the behavior when there is an Intelligent Search term redirect registered on VTEX Admin, redirecting the user on the client-side.
FastStore Experience team discussed about solving this on the server-side, but we are not going to handle the drawbacks of generate the search page (
pages/s.tsx
) as SSR usinggetServerSideProps
right now. By performing this query (and the other function calls) as SSR page, each time user visits that page the potential extra costs needs to be validated later.How it works?
When performing a search, if the term has a redirect registered on VTEX Admin the value of the
redirect
field should be an URL, used to redirect the user to an internal or external URL.Check https://github.com/vtex/faststore/pull/1749 for more information.
How to test it?
@faststore/core
local server (yarn dev
);tech
in the search input field, you should be redirected to the/technology
slug page.This happens because there is already a redirect registered for the
storeframework
account.Starters Deploy Preview