reset topic edit on nav

This commit is contained in:
Roland Osborne 2022-07-01 11:58:18 -07:00
parent edf2b7b1d4
commit ce5cbb1f6f

View File

@ -19,6 +19,18 @@ export function useAddTopic() {
const card = useContext(CardContext); const card = useContext(CardContext);
const channel = useContext(ChannelContext); const channel = useContext(ChannelContext);
useEffect(() => {
updateState({
assets: [],
messageText: null,
textColor: '#444444',
textColorSet: false,
textSize: 14,
textSizeSet: false,
busy: false,
});
}, [cardId, channelId]);
const updateState = (value) => { const updateState = (value) => {
setState((s) => ({ ...s, ...value })); setState((s) => ({ ...s, ...value }));
} }