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

feat: Add User Table (#2) #13

Merged
merged 4 commits into from
Mar 6, 2024
Merged

feat: Add User Table (#2) #13

merged 4 commits into from
Mar 6, 2024

Conversation

cengelbart39
Copy link
Contributor

Adds a Chakra UI Table containing data from sample_data.json.

Sorts users by name alphabetically and only shows active users.

Closes #2.

@cengelbart39 cengelbart39 marked this pull request as draft March 1, 2024 00:41
@cengelbart39
Copy link
Contributor Author

It doesn't like how I'm importing a JSON file. While this just displays a warning by ESLint when running locally, it becomes a problem here.

I'm not sure what's the best course of action to fix this. I could mess with the ESLint config or see if there's another way to import the file that won't run afoul of ESLint.

@miguel-merlin
Copy link
Member

It doesn't like how I'm importing a JSON file. While this just displays a warning by ESLint when running locally, it becomes a problem here.

I'm not sure what's the best course of action to fix this. I could mess with the ESLint config or see if there's another way to import the file that won't run afoul of ESLint.

@cengelbart39 You can run npm run lint to fix linter warnings

@cengelbart39
Copy link
Contributor Author

cengelbart39 commented Mar 1, 2024

@miguel-merlin I get warning: Unexpected use of file extension "json" for "../sample_data.json" import/extensions since I'm importing the file, whether I run npm run lint directly or not.

@cengelbart39
Copy link
Contributor Author

@miguel-merlin I get warning: Unexpected use of file extension "json" for "../sample_data.json" import/extensions since I'm importing the file, whether I run npm run lint directly or not.

@miguel-merlin Any thoughts on this?

@miguel-merlin
Copy link
Member

@miguel-merlin I get warning: Unexpected use of file extension "json" for "../sample_data.json" import/extensions since I'm importing the file, whether I run npm run lint directly or not.

@miguel-merlin Any thoughts on this?

@cengelbart39 We deployed our backend last week; instead of fetching stuff from the JSON, you can use the API. You'll find it in the src/api/lib/users.tsx. You can use the getAllUsers endpoint which returns the sample JSON. You will have to wrap the API call in a useState hook.

@miguel-merlin miguel-merlin marked this pull request as ready for review March 6, 2024 15:50
@miguel-merlin
Copy link
Member

@cengelbart39 I disabled the linter error for now.

Copy link
Member

@miguel-merlin miguel-merlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! Thanks for contributing

@miguel-merlin miguel-merlin merged commit 34b1245 into main Mar 6, 2024
1 check passed
@miguel-merlin
Copy link
Member

@cengelbart39 Merged!

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

Successfully merging this pull request may close these issues.

Table displaying users
2 participants