mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
refacotr(FE-438): Unsubscribe validate subscription and close drawer
This commit is contained in:
@@ -345,8 +345,11 @@ const UniformityForm = ({
|
|||||||
setIsValid(true);
|
setIsValid(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
return unsub;
|
return () => {
|
||||||
}, []);
|
unsub();
|
||||||
|
useUiStore.getState().setExpandedDrawerOpen(false);
|
||||||
|
};
|
||||||
|
}, [subscribeValidate, setIsValid]);
|
||||||
|
|
||||||
// ===== EVENT HANDLERS =====
|
// ===== EVENT HANDLERS =====
|
||||||
const handleOpenExpandedDrawer = () => {
|
const handleOpenExpandedDrawer = () => {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ type MainUiSlice = {
|
|||||||
type DrawerUISlice = {
|
type DrawerUISlice = {
|
||||||
triggerValidate: boolean;
|
triggerValidate: boolean;
|
||||||
toggleValidate: () => void;
|
toggleValidate: () => void;
|
||||||
subscribeValidate: (callback: () => void) => void;
|
subscribeValidate: (callback: () => void) => () => void;
|
||||||
isValid: boolean;
|
isValid: boolean;
|
||||||
setIsValid: (v: boolean) => void;
|
setIsValid: (v: boolean) => void;
|
||||||
subscribeIsValid: (callback: (isValid: boolean) => void) => () => void;
|
subscribeIsValid: (callback: (isValid: boolean) => void) => () => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user