mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
reset topic edit on nav
This commit is contained in:
parent
edf2b7b1d4
commit
ce5cbb1f6f
@ -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 }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user