From 1b278c170ac12c2fb84a29630bdf9402919588e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20=C5=BBuraw?= <9116238+krzysztofzuraw@users.noreply.github.com> Date: Mon, 22 May 2023 11:12:20 +0200 Subject: [PATCH] Fix font in customer history login data (#3669) --- .../CustomerStats/CustomerStats.tsx | 55 +++++++------------ 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/src/customers/components/CustomerStats/CustomerStats.tsx b/src/customers/components/CustomerStats/CustomerStats.tsx index 0e7c2eec0..9e9855d14 100644 --- a/src/customers/components/CustomerStats/CustomerStats.tsx +++ b/src/customers/components/CustomerStats/CustomerStats.tsx @@ -1,69 +1,54 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { DateTime } from "@dashboard/components/Date"; -import { Hr } from "@dashboard/components/Hr"; import RequirePermissions from "@dashboard/components/RequirePermissions"; import Skeleton from "@dashboard/components/Skeleton"; import { CustomerDetailsQuery, PermissionEnum } from "@dashboard/graphql"; -import { Card, CardContent, Typography } from "@material-ui/core"; -import { makeStyles } from "@saleor/macaw-ui"; +import { Divider, Text } from "@saleor/macaw-ui/next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -const useStyles = makeStyles( - theme => ({ - label: { - marginBottom: theme.spacing(1), - }, - value: { - fontSize: 24, - }, - }), - { name: "CustomerStats" }, -); - export interface CustomerStatsProps { customer: CustomerDetailsQuery["user"]; } const CustomerStats: React.FC = props => { const { customer } = props; - const classes = useStyles(props); const intl = useIntl(); return ( - - + + {intl.formatMessage({ id: "e7Nyu7", defaultMessage: "Customer History", description: "section header", })} - /> - - + + + - + {customer ? ( - + {customer.lastLogin === null ? ( "-" ) : ( )} - + ) : ( )} - + -
- - + + + - + {customer && customer.lastPlacedOrder ? ( - + {customer.lastPlacedOrder.edges.length === 0 ? ( "-" ) : ( @@ -72,13 +57,13 @@ const CustomerStats: React.FC = props => { plain /> )} - + ) : ( )} - +
-
+ ); }; CustomerStats.displayName = "CustomerStats";