refactor(web): remove typescript

This commit is contained in:
Ali BARIN
2024-02-27 15:23:23 +00:00
parent 636870a075
commit b3ae2d2748
337 changed files with 2067 additions and 4997 deletions

View File

@@ -5,28 +5,16 @@ import CardActionArea from '@mui/material/CardActionArea';
import CardContent from '@mui/material/CardContent';
import Typography from '@mui/material/Typography';
import { DateTime } from 'luxon';
import useFormatMessage from 'hooks/useFormatMessage';
interface NotificationCardProps {
name: string;
createdAt: string;
documentationUrl: string;
description: string;
}
const getHumanlyDate = (timestamp: number) =>
const getHumanlyDate = (timestamp) =>
DateTime.fromMillis(timestamp).toRelative();
export default function NotificationCard(props: NotificationCardProps) {
export default function NotificationCard(props) {
const { name, createdAt, documentationUrl, description } = props;
const formatMessage = useFormatMessage();
const relativeCreatedAt = getHumanlyDate(new Date(createdAt).getTime());
const subheader = formatMessage('notification.releasedAt', {
relativeDate: relativeCreatedAt,
});
return (
<Card>
<CardActionArea component={'a'} href={documentationUrl} target="_blank">