justify date
This commit is contained in:
parent
d1574e0922
commit
49022991c2
@ -1,6 +1,9 @@
|
||||
import { getWeekDay, getTime, getAMPM } from "../services/utils";
|
||||
import styles from "./DateAndTime.module.css";
|
||||
|
||||
export const DateAndTime = ({ weatherData, systemUsed }) => (
|
||||
export const DateAndTime = ({ weatherData, systemUsed }) => {
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<h2>
|
||||
{`${getWeekDay(weatherData)}, ${getTime(
|
||||
systemUsed,
|
||||
@ -8,4 +11,6 @@ export const DateAndTime = ({ weatherData, systemUsed }) => (
|
||||
weatherData.timezone
|
||||
)} ${getAMPM(systemUsed, weatherData.dt, weatherData.timezone)}`}
|
||||
</h2>
|
||||
);
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
4
components/DateAndTime.module.css
Normal file
4
components/DateAndTime.module.css
Normal file
@ -0,0 +1,4 @@
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user