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

Menu item and options query optimization #203

Open
Tracked by #202
AndrewLester opened this issue Aug 1, 2021 · 0 comments
Open
Tracked by #202

Menu item and options query optimization #203

AndrewLester opened this issue Aug 1, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@AndrewLester
Copy link
Member

AndrewLester commented Aug 1, 2021

Making requests for the menu items and options on both the menu and cart pages of the site is unnecessary in sveltekit's SPA structure. Instead, let's make a request for the menu items and options inside the __layout file of routes directory, which will only run once when the user loads either the cart or menu pages. When the user switches between the two, this file won't run.

To get the data from the __layout file into the actual pages (menu and cart), you can either use Svelte's context API or a store. I recommend a store in this case.

@AndrewLester AndrewLester added this to the Future milestone Aug 1, 2021
@AndrewLester AndrewLester added the enhancement New feature or request label Aug 1, 2021
@AndrewLester AndrewLester added this to To do in Menu and order site via automation Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant