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

[web] Fetch categories from the server #342

Open
rhinodavid opened this issue May 5, 2020 · 1 comment
Open

[web] Fetch categories from the server #342

rhinodavid opened this issue May 5, 2020 · 1 comment

Comments

@rhinodavid
Copy link
Member

As it stands today, the web app uses a hard-coded list of categories (https://github.com/CodeForBoulder/upswyng/blob/master/packages/upswyng-web/src/components/Categories.tsx).

However, the database has a Category table, as well as an endpoint to serve them (https://github.com/CodeForBoulder/upswyng/blob/master/packages/upswyng-server/src/routes/api/categories.ts).

Right now we've got a fragile situation because nothing ensures that these two data sources are in sync. We need to remove the dependency on the hard-coded categories and instead fetch them from the server.

A broad overview of the steps:

@rhinodavid
Copy link
Member Author

A different option -- we could extract the categories/subcategories in the setupCategories.ts script and put them in core and just have both packages reference them

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

No branches or pull requests

2 participants