set active channel in publish form on load

This commit is contained in:
Sean Yesmunt 2021-02-11 01:01:07 -05:00
parent 02019edcb7
commit ca4ca536fa

View file

@ -229,8 +229,10 @@ function PublishForm(props: Props) {
}, [mode, updatePublishForm]);
useEffect(() => {
if (activeChannelName) {
if (incognito) {
updatePublishForm({ channel: undefined });
} else if (activeChannelName) {
updatePublishForm({ channel: activeChannelName });
}
}, [activeChannelName, incognito, updatePublishForm]);