refactor(web): remove typescript
This commit is contained in:
@@ -2,7 +2,6 @@ import * as React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import Box from '@mui/material/Box';
|
||||
import Stack from '@mui/material/Stack';
|
||||
|
||||
import useNotifications from 'hooks/useNotifications';
|
||||
import Container from 'components/Container';
|
||||
import NotificationCard from 'components/NotificationCard';
|
||||
@@ -10,29 +9,19 @@ import PageTitle from 'components/PageTitle';
|
||||
import useFormatMessage from 'hooks/useFormatMessage';
|
||||
import useAutomatischInfo from 'hooks/useAutomatischInfo';
|
||||
import * as URLS from 'config/urls';
|
||||
|
||||
interface INotification {
|
||||
name: string;
|
||||
createdAt: string;
|
||||
documentationUrl: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export default function Updates(): React.ReactElement {
|
||||
export default function Updates() {
|
||||
const navigate = useNavigate();
|
||||
const formatMessage = useFormatMessage();
|
||||
const { notifications } = useNotifications();
|
||||
const { isMation, loading } = useAutomatischInfo();
|
||||
|
||||
React.useEffect(
|
||||
function redirectToHomepageInMation() {
|
||||
if (!loading && isMation) {
|
||||
navigate(URLS.DASHBOARD);
|
||||
}
|
||||
},
|
||||
[loading, isMation]
|
||||
[loading, isMation],
|
||||
);
|
||||
|
||||
return (
|
||||
<Box sx={{ py: 3 }}>
|
||||
<Container>
|
||||
@@ -41,7 +30,7 @@ export default function Updates(): React.ReactElement {
|
||||
</PageTitle>
|
||||
|
||||
<Stack gap={2}>
|
||||
{notifications.map((notification: INotification) => (
|
||||
{notifications.map((notification) => (
|
||||
<NotificationCard
|
||||
key={notification.name}
|
||||
name={`Version ${notification.name}`}
|
Reference in New Issue
Block a user