performance enhancements

This commit is contained in:
cv
2021-05-02 15:05:32 +02:00
parent 7f94907056
commit 9715e13152
11 changed files with 137 additions and 63 deletions
@@ -1,9 +1,8 @@
import { useEffect, useState } from 'react';
import { memo, useEffect, useState } from 'react';
import { formatDisplay } from '../../dateConfig';
import styles from './Countdown.module.css';
export default function Countdown(props) {
const { time, small, hideZeroHours } = props;
const Countdown = ({ time, small, hideZeroHours }) => {
const [clock, setClock] = useState(time);
let display = '-- : -- : --';
@@ -20,4 +19,6 @@ export default function Countdown(props) {
{display}
</div>
);
}
};
export default memo(Countdown);
@@ -1,5 +1,3 @@
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;800&display=swap');
.entries {
display: flex;
flex-direction: column;