Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove dead code

dominik-zeglenfbe803431fde
diff --git a/saleor/static/dashboard-next/components/DateFormatter/DateFormatter.tsx b/saleor/static/dashboard-next/components/DateFormatter/DateFormatter.tsx
index 862806de2f..fcdc4a88a8 100644
--- a/saleor/static/dashboard-next/components/DateFormatter/DateFormatter.tsx
+++ b/saleor/static/dashboard-next/components/DateFormatter/DateFormatter.tsx
@@ -3,9 +3,6 @@ import Tooltip from "@material-ui/core/Tooltip";
import Typography, { TypographyProps } from "@material-ui/core/Typography";
import * as React from "react";
-import { LocaleConsumer } from "../Locale";
-import { Consumer } from "./DateContext";
-
interface DateFormatterProps {
date: string;
locale?: string;
@@ -21,33 +18,15 @@ const decorate = withStyles(
const DateFormatter = decorate<DateFormatterProps>(
({ classes, date, typographyProps }) => {
return (
- <LocaleConsumer>
- {_ => (
- <Consumer>
- {_ => (
- <Typography
- component="span"
- className={classes.root}
- {...typographyProps}
- >
- {/* <Tooltip
- title={moment(date)
- .locale(locale)
- .toDate()
- .toLocaleString()}
- >
- <ReactMoment from={dateNow} locale={locale}>
- {date}
- </ReactMoment>
- </Tooltip> */}
- <Tooltip title={date}>
- <span>{date}</span>
- </Tooltip>
- </Typography>
- )}
- </Consumer>
- )}
- </LocaleConsumer>
+ <Typography
+ component="span"
+ className={classes.root}
+ {...typographyProps}
+ >
+ <Tooltip title={date}>
+ <span>{date}</span>
+ </Tooltip>
+ </Typography>
);
}
);