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