Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Oct 22, 2024
1 parent c688605 commit c62e070
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export const useAnnouncements = (): Announcement[] => {
),
},
{
announcementKey: 'redesign9.0',
announcementKey: process.env.OT_PD_VERSION ?? 'redesign9.0',
image: <Flex />,
heading: t('announcements.redesign.body1'),
message: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const AnnouncementModal = (
justifyContent={JUSTIFY_CENTER}
gridGap={SPACING.spacing12}
>
{image && image}
{image != null && image}
{message}
</Flex>
</Modal>
Expand Down
5 changes: 3 additions & 2 deletions protocol-designer/src/pages/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function Landing(): JSX.Element {
const [showAnnouncementModal, setShowAnnouncementModal] = useState<boolean>(
false
)
const { bakeToast } = useKitchen()
const { bakeToast, eatToast } = useKitchen()
const announcements = useAnnouncements()
const lastAnnouncement = announcements[announcements.length - 1]
const announcementKey = lastAnnouncement
Expand All @@ -50,14 +50,15 @@ export function Landing(): JSX.Element {

useEffect(() => {
if (userHasNotSeenAnnouncement) {
bakeToast(
const toastId = bakeToast(
t('learn_more', { version: process.env.OT_PD_VERSION }) as string,
INFO_TOAST,
{
heading: t('updated_protocol_designer'),
closeButton: true,
linkText: t('view_release_notes'),
onLinkClick: () => {
eatToast(toastId)
setShowAnnouncementModal(true)
},
disableTimeout: true,
Expand Down

0 comments on commit c62e070

Please sign in to comment.