-
Notifications
You must be signed in to change notification settings - Fork 189
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 from gatsby to next.js #1515
Conversation
@sonechca : Hi there, we are in the process of reviewing these migrated to Next PRs. Just wonder if you are still interested to work on this as we would like you to make some changes to your PR. Please let us know in case you decided to drop this then we can assign the issue to others. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of things to do, and also, please git mv
the file src/frontend/next/src/components/AdminButtons/AdminButtons.tsx to src/frontend/next/src/components/AdminButtons.tsx (i.e., get rid of the directory).
@@ -0,0 +1,4 @@ | |||
import { createContext } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this file.
import { IconButton } from '@material-ui/core'; | ||
import FlagIcon from '@material-ui/icons/Flag'; | ||
import DeleteIcon from '@material-ui/icons/Delete'; | ||
import { UserStateContext } from '../../contexts/User/UserContext'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once #1521 lands (hopefully soon), we can change this to:
import { useUser } from '../UserProvider';
|
||
function AdminButtons() { | ||
const classes = useStyles(); | ||
const user = useContext(UserStateContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can become:
const user = useUser();
Also, you need a rebase on
|
@sonechca what's happening here? I'd like to get this shipped today. |
We decided to move this to 1.6, and we'll take the work in #1504 to add a dummy AdminButtons component for now. |
close by #1619 |
Issue This PR Addresses
Fixed: #1494
Type of Change
Description
Checklist