Skip to content

Commit aa5491c

Browse files
committed
refactor(releases): simplifiying date formatting for overview
1 parent 42d77d7 commit aa5491c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/sanity/src/core/releases/tool/overview/ReleasesOverviewColumnDefs.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const ReleaseTime = ({release}: {release: TableRelease}) => {
2828

2929
const {metadata} = release
3030

31-
const getTimezoneAbbreviation = useCallback(() => {
32-
if (timeZone.abbreviation === localeTimeZoneAbbreviation) return ''
33-
34-
return `(${timeZone.abbreviation})`
35-
}, [localeTimeZoneAbbreviation, timeZone.abbreviation])
31+
const getTimezoneAbbreviation = useCallback(
32+
() =>
33+
timeZone.abbreviation === localeTimeZoneAbbreviation ? '' : `(${timeZone.abbreviation})`,
34+
[localeTimeZoneAbbreviation, timeZone.abbreviation],
35+
)
3636

3737
const timeString = useMemo(() => {
3838
if (metadata.releaseType === 'asap') {

0 commit comments

Comments
 (0)