Skip to content

Commit

Permalink
fix: add padding above the "Push to reload" button instead of below (#…
Browse files Browse the repository at this point in the history
…7464)

* Add padding above the "Push to reload" button instead of below

* refactor: remove redundant box

---------

Co-authored-by: Carolina Gonzalez <[email protected]>
  • Loading branch information
SimeonGriggs and cngonzalez authored Sep 17, 2024
1 parent daf4ffa commit 1a33125
Showing 1 changed file with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Box, Stack, useToast} from '@sanity/ui'
import {Box, useToast} from '@sanity/ui'
import {type ReactNode, useCallback, useEffect, useRef} from 'react'
import {SANITY_VERSION} from 'sanity'
import semver from 'semver'
Expand All @@ -10,7 +10,7 @@ import {checkForLatestVersions} from './checkForLatestVersions'

// How often to to check last timestamp. at 30 min, should fetch new version
const REFRESH_INTERVAL = 1000 * 30 // every 30 seconds
const SHOW_TOAST_FREQUENCY = 1000 * 60 * 30 //half hour
const SHOW_TOAST_FREQUENCY = 1000 * 60 * 30 // half hour

const currentPackageVersions: Record<string, string> = {
sanity: SANITY_VERSION,
Expand All @@ -32,17 +32,15 @@ export function PackageVersionStatusProvider({children}: {children: ReactNode})
id: 'new-package-available',
title: t('package-version.new-package-available.title'),
description: (
<Stack space={2} paddingBottom={2}>
<Box>
<Button
size="large"
aria-label={t('package-version.new-package-available.reload-button')}
onClick={onClick}
text={t('package-version.new-package-available.reload-button')}
tone={'primary'}
/>
</Box>
</Stack>
<Box paddingTop={2}>
<Button
size="large"
aria-label={t('package-version.new-package-available.reload-button')}
onClick={onClick}
text={t('package-version.new-package-available.reload-button')}
tone={'primary'}
/>
</Box>
),
closable: true,
status: 'info',
Expand Down

0 comments on commit 1a33125

Please sign in to comment.