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

fix #1494: Port adminbutton to [next] #1619

Merged
merged 2 commits into from
Jan 29, 2021
Merged

fix #1494: Port adminbutton to [next] #1619

merged 2 commits into from
Jan 29, 2021

Conversation

yuanLeeMidori
Copy link
Contributor

@yuanLeeMidori yuanLeeMidori commented Jan 29, 2021

Issue This PR Addresses

Fixes: #1494

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI
  • Nextjs

Description

image

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

const user = useUser();

return (
user.isAdmin && (
Copy link
Contributor

Choose a reason for hiding this comment

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

if(!user.isAdmin) {
  return null;
}
...rest of code.

@yuanLeeMidori yuanLeeMidori merged commit 228ad49 into Seneca-CDOT:master Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nextjs Nextjs related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[next] Port AdminButtons/ to NextJS
4 participants