less nesting

This commit is contained in:
end-4
2024-01-29 12:06:44 +07:00
parent 1a06184ec8
commit dc5aa31732
@@ -236,8 +236,7 @@ const arr = (s, n) => {
return array; return array;
}; };
const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) => { const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) => Widget.Box({
return Widget.Box({
children: arr(startWorkspace, workspaces).map(Workspace), children: arr(startWorkspace, workspaces).map(Workspace),
attribute: { attribute: {
update: box => { update: box => {
@@ -267,12 +266,10 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) =>
if (name == 'overview' && visible) box.attribute.update(box); if (name == 'overview' && visible) box.attribute.update(box);
}) })
, ,
}); });
}
export default () => { export default () => Widget.Revealer({
const overviewRevealer = Widget.Revealer({
revealChild: true, revealChild: true,
transition: 'slide_down', transition: 'slide_down',
transitionDuration: 200, transitionDuration: 200,
@@ -286,6 +283,4 @@ export default () => {
}) })
) )
}), }),
}); });
return overviewRevealer;
};