Skip to content

Commit

Permalink
fix type issues for build
Browse files Browse the repository at this point in the history
  • Loading branch information
dudash committed Apr 4, 2023
1 parent 788a8d9 commit 19d78cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webapp/src/app/Dashboard/WorldMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const WorldMap = (params) => {
/// Popup Alerts Component
///
const [alerts, setAlerts] = React.useState<Partial<AlertProps>[]>([]);
const btnClasses = ['pf-c-button', 'pf-m-secondary'].join(' ');
/// add an alert
const addAlert = (title: string, variant: AlertProps['variant'], key: React.Key) => { setAlerts(prevAlerts => [...prevAlerts, { title, variant, key }]); };
/// remove an alert
Expand Down Expand Up @@ -207,10 +206,10 @@ const WorldMap = (params) => {
<AlertGroup isToast isLiveRegion>
{alerts.map(({ key, variant, title }) => (
<Alert
variant={AlertVariant[variant]}
variant={AlertVariant[variant as keyof typeof AlertVariant]}
title={title}
timeout={7000}
actionClose={<AlertActionCloseButton title={title as string} variantLabel={`${variant} alert`} onClose={() => removeAlert(key)} />} key={key}
actionClose={<AlertActionCloseButton title={title as string} variantLabel={`${variant} alert`} onClose={() => removeAlert(key as React.Key)} />} key={key}
/>
))}
</AlertGroup>
Expand Down

0 comments on commit 19d78cc

Please sign in to comment.