source: frontend/src/Components/TransportDetails/FinalPoint.js@ 5528b99

Last change on this file since 5528b99 was 5528b99, checked in by darsov2 <62809499+darsov2@…>, 6 months ago

revert

  • Property mode set to 100644
File size: 1.2 KB
Line 
1import React from "react";
2import { Container, Row, Col } from "react-bootstrap";
3import { RxDotFilled } from "react-icons/rx"
4import Line from "./Line";
5
6const FinalPoint = (props) => {
7 console.log(props.left)
8 const style = props.left === "true" ? {textAlign: "left"} : {}
9 console.log(style)
10
11 const getTimeAsString = (dateString) => {
12 const date = new Date(dateString)
13 return `${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;
14 }
15
16 return (
17 <>
18 <Row>
19 {props.left === "true" && <Col className="d-flex flex-column justify-content-center col-auto" style={{paddingLeft: "2.6rem"}}>
20 <h5 className="m-auto">{getTimeAsString(props.time)}</h5>
21 </Col> }
22 <Col md="auto">
23 <RxDotFilled size={"4rem"} color="#159895"></RxDotFilled>
24 </Col>
25 <Col className="d-flex flex-column justify-content-center">
26 <h3 className="my-auto" style={style}>{props.city}</h3>
27 </Col>
28 {props.left !== "true" && <Col className="d-flex flex-column justify-content-center">
29 <h5>{getTimeAsString(props.time)}</h5>
30 </Col> }
31 </Row>
32 <Row>
33 </Row>
34 </>
35 );
36};
37
38export default FinalPoint;
Note: See TracBrowser for help on using the repository browser.