Skip to content

Commit b473e04

Browse files
foxishdavixcky
authored andcommitted
added highlighting for driver plate
1 parent 3a55d11 commit b473e04

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

services/frontend/react_app/src/pages/home.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ import {MainLayout} from "../components/layouts";
22
import {
33
Box,
44
Button,
5-
Card,
6-
CardBody,
7-
CardHeader,
5+
Text,
86
Heading,
7+
useDisclosure,
8+
useToast,
9+
Badge,
910
HStack,
1011
Stack,
12+
Card,
13+
CardHeader,
14+
CardBody,
1115
StackDivider,
12-
Text,
13-
useDisclosure,
14-
useToast,
1516
} from "@chakra-ui/react";
1617
import styles from "./home.module.css";
1718

@@ -31,7 +32,9 @@ const countdownRenderer = ({minutes, seconds, driverName, driverPlate, props }:
3132
if (minutes === 0 && seconds === 0) {
3233
return <Text>{driverName} arrived</Text>;
3334
} else {
34-
return <Text as="b">The driver {driverName} ({driverPlate}) will arrive in {props.overtime ? "-" : ""}{minutes.toString().padStart(2, "0")}:{seconds.toString().padStart(2, "0")}</Text>;
35+
return <Text as="b">
36+
The driver {driverName} <Badge colorScheme="purple" px={2} py={1} borderRadius="md" fontSize="0.9em">{driverPlate}</Badge> will arrive in {props.overtime ? "-" : ""}{minutes.toString().padStart(2, "0")}:{seconds.toString().padStart(2, "0")}
37+
</Text>;
3538
}
3639
};
3740

0 commit comments

Comments
 (0)