From ae0febc832783784578205eb726d0f7a9fa09757 Mon Sep 17 00:00:00 2001 From: tomholford Date: Tue, 29 Nov 2022 07:51:57 -0800 Subject: [PATCH] grid: dismiss Base Blocked notice on Archive --- pkg/grid/src/nav/notifications/Inbox.tsx | 2 +- pkg/grid/src/nav/notifications/SystemNotification.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/grid/src/nav/notifications/Inbox.tsx b/pkg/grid/src/nav/notifications/Inbox.tsx index 4661f884e0..74d5b880b1 100644 --- a/pkg/grid/src/nav/notifications/Inbox.tsx +++ b/pkg/grid/src/nav/notifications/Inbox.tsx @@ -13,7 +13,7 @@ function renderNotification(notification: Notification, key: string, lid: HarkLi return ; } if (notification.bin.path === '/blocked' && notification.bin.place.path === '/desk/base') { - return ; + return ; } if (notification.bin.place.path === '/onboard') { return ; diff --git a/pkg/grid/src/nav/notifications/SystemNotification.tsx b/pkg/grid/src/nav/notifications/SystemNotification.tsx index dc8ad9b84b..60b6584af6 100644 --- a/pkg/grid/src/nav/notifications/SystemNotification.tsx +++ b/pkg/grid/src/nav/notifications/SystemNotification.tsx @@ -1,6 +1,6 @@ import { pick, partition } from 'lodash'; import React, { useCallback } from 'react'; -import { kilnBump, Pike } from '@urbit/api'; +import { HarkBin, HarkLid, kilnBump, Pike } from '@urbit/api'; import { useHistory } from 'react-router-dom'; import { AppList } from '../../components/AppList'; import { Button } from '../../components/Button'; @@ -12,6 +12,7 @@ import useKilnState, { usePike } from '../../state/kiln'; import { NotificationButton } from './NotificationButton'; import { disableDefault } from '../../state/util'; +import { useHarkStore } from '../../state/hark'; export const RuntimeLagNotification = () => (
kelvin === newKelvin); } -export const BaseBlockedNotification = () => { +export const BaseBlockedNotification = ({ bin, lid }: { bin: HarkBin, lid: HarkLid }) => { const basePike = usePike('base'); const { push } = useHistory(); // TODO: assert weft.name === 'zuse'?? @@ -68,6 +69,8 @@ export const BaseBlockedNotification = () => { const handleArchiveApps = useCallback(async () => { await api.poke(kilnBump()); + await useHarkStore.getState().archiveNote(bin, lid); + push('/leap/upgrading'); }, []);