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 => {
@@ -268,11 +267,9 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) =>
}) })
, ,
}); });
}
export default () => { export default () => Widget.Revealer({
const overviewRevealer = Widget.Revealer({
revealChild: true, revealChild: true,
transition: 'slide_down', transition: 'slide_down',
transitionDuration: 200, transitionDuration: 200,
@@ -287,5 +284,3 @@ export default () => {
) )
}), }),
}); });
return overviewRevealer;
};