Skip to content

Commit

Permalink
chore: fixing typescript compile errors with new DateTimeFormatOptions
Browse files Browse the repository at this point in the history
Signed-off-by: blam <ben@blam.sh>
  • Loading branch information
benjdlambert committed Mar 30, 2021
1 parent d7d2706 commit dd880a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/layout/HomepageTimer/HomepageTimer.tsx
Expand Up @@ -18,7 +18,10 @@ import React from 'react';
import { HeaderLabel } from '../HeaderLabel';
import { ConfigApi, useApi, configApiRef } from '@backstage/core-api';

const timeFormat = { hour: '2-digit', minute: '2-digit' };
const timeFormat: Intl.DateTimeFormatOptions = {
hour: '2-digit',
minute: '2-digit',
};

type TimeObj = {
time: string;
Expand All @@ -41,7 +44,7 @@ function getTimes(configApi: ConfigApi) {
if (clock.has('label') && clock.has('timezone')) {
let label = clock.getString('label');

const options = {
const options: Intl.DateTimeFormatOptions = {
timeZone: clock.getString('timezone'),
...timeFormat,
};
Expand Down

0 comments on commit dd880a6

Please sign in to comment.