diff --git a/packages/desktop-client/src/components/schedules/index.js b/packages/desktop-client/src/components/schedules/index.js index 96fdf05b6f0f15baa7e0069fd52c1b1f66699dbb..2da022558ab9a88fc72b4366dbfcc104114d423b 100644 --- a/packages/desktop-client/src/components/schedules/index.js +++ b/packages/desktop-client/src/components/schedules/index.js @@ -27,6 +27,10 @@ export default function Schedules() { history.push(`/schedule/edit`, { locationPtr: history.location }); } + function onDiscover() { + history.push(`/schedule/discover`, { locationPtr: history.location }); + } + async function onAction(name, id) { switch (name) { case 'post-transaction': @@ -70,7 +74,15 @@ export default function Schedules() { /> </View> - <View style={{ alignItems: 'flex-end', margin: '20px 0', flexShrink: 0 }}> + <View + style={{ + flexDirection: 'row', + justifyContent: 'space-between', + margin: '20px 0', + flexShrink: 0 + }} + > + <Button onClick={onDiscover}>Find schedules</Button> <Button primary onClick={onAdd}> Add new schedule </Button> diff --git a/packages/loot-design/src/components/sidebar.js b/packages/loot-design/src/components/sidebar.js index 5d4154ff5d229a79e9609ee068e8fefd71275e6f..163ecc33721842544ff648143d65d3532e27b582 100644 --- a/packages/loot-design/src/components/sidebar.js +++ b/packages/loot-design/src/components/sidebar.js @@ -438,7 +438,6 @@ function Tools() { let items = [ { name: 'payees', text: 'Payees' }, { name: 'rules', text: 'Rules' }, - { name: 'find-schedules', text: 'Find schedules' }, { name: 'repair-splits', text: 'Repair split transactions' } ]; @@ -451,9 +450,6 @@ function Tools() { case 'rules': history.push('/rules'); break; - case 'find-schedules': - history.push('/schedule/discover'); - break; case 'repair-splits': history.push('/tools/fix-splits', { locationPtr: history.location }); break; @@ -473,12 +469,9 @@ function Tools() { onClick={onToggle} style={{ pointerEvents: isOpen ? 'none' : 'auto' }} forceHover={isOpen} - forceActive={[ - '/payees', - '/rules', - '/tools', - '/schedule/discover' - ].some(route => location.pathname.startsWith(route))} + forceActive={['/payees', '/rules', '/tools'].some(route => + location.pathname.startsWith(route) + )} button={ <ChevronRight width={12}