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

Only create cookie when needed #49

Open
coyotte508 opened this issue May 15, 2023 · 0 comments
Open

Only create cookie when needed #49

coyotte508 opened this issue May 15, 2023 · 0 comments

Comments

@coyotte508
Copy link
Collaborator

coyotte508 commented May 15, 2023

For example, when a product is added to cart. (I think that's the only thing)

There's no need to create a cookie before that.

The cookie should also be refreshed in layout.server.ts instead of hooks.server.ts, and only if cart is not empty. We can change the expiration from 1 year to 30 days as well.

Related to #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants