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

Adding a very rudimentary admin page that displays a table of users #476

Merged
merged 2 commits into from
Jan 7, 2023

Conversation

fozziethebeat
Copy link
Collaborator

This starts #237 with a very basic and minimally styled version. This does not include any management functionality, that will be in a follow up PR.

Comment on lines 13 to 14
onSuccess: (data) => {
setUsers(data);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit:

onSuccess: setUsers

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

}, [session, status]);

// While loading, just show something.
if (status === "loading") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you please extract shared stuff out of the if statement?

the only thing different is contents of main:

<main className="oa-basic-theme">
{status === "loading": "loading..." : <UserCell/>}
</main>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. This came from a bit of moving things around and I didn't realize it could be cleaner.

@AbdBarho AbdBarho merged commit c9e5f1f into main Jan 7, 2023
@AbdBarho AbdBarho deleted the 237-admin-page branch January 7, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants