mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-05-12 19:36:41 +07:00
refactored rerendering speed
This commit is contained in:
parent
b6bf317649
commit
69d1d749cf
32 changed files with 144 additions and 2045 deletions
|
@ -32,20 +32,11 @@ const mapStateToProps = ({
|
|||
user: { role },
|
||||
},
|
||||
}: IState) => {
|
||||
if (routes.filter.max >= 9999) {
|
||||
return {
|
||||
routes,
|
||||
editing,
|
||||
ready: false,
|
||||
role,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
role,
|
||||
routes,
|
||||
editing,
|
||||
ready: true,
|
||||
ready: routes.filter.max < 9999,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -89,18 +89,17 @@ const mapDispatchToProps = {
|
|||
editorRouterSubmit: EDITOR_ACTIONS.editorRouterSubmit,
|
||||
};
|
||||
|
||||
type Props = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & { };
|
||||
type Props = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {};
|
||||
|
||||
const RouterDialogUnconnected: FC<Props> = ({
|
||||
editor: {
|
||||
router: { waypoints },
|
||||
is_routing,
|
||||
},
|
||||
editorRouterCancel,
|
||||
editorRouterSubmit,
|
||||
}) => (
|
||||
<div className="control-dialog bottom right">
|
||||
<div className={classnames('save-loader', { active: is_routing })} />
|
||||
<div className={classnames('save-loader')} />
|
||||
|
||||
{!waypoints.length && noPoints({ editorRouterCancel })}
|
||||
{waypoints.length === 1 && firstPoint({ editorRouterCancel })}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue