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
Add draft mode for contributions/timetable #4095
Add draft mode for contributions/timetable #4095
Conversation
const [modalOpen, setModalOpen] = useState(false); | ||
|
||
useEffect(() => { | ||
const fetchPublicationSetting = async () => { |
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.
Is there any reason why this function has been defined inside the useEffect
callback? Even though this effect will not be called more than once (since confId
will not change) I think it would be nice to move the function outside of the callback and then you could also remove the confId
from the useEffect
dependencies.
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.
I think the eventId
should stay in the dependency list. In the case of the prop changing to another ID (even if that's not gonna happen), you want to reload the data for the new ID.
f465ee4
to
823d237
Compare
823d237
to
3bd929e
Compare
dfd7b16
to
a0a2f40
Compare
Make code improvements
fd0aa49
to
98dd876
Compare
closes #4056
TODO: