A Pen by David Piruzashvili on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getMinut({ from, to }) { | |
const t = Date.parse(to) - Date.parse(from); | |
return Math.floor((t / 1000 / 60) % 60); | |
} | |
function combineMinutes(data) { | |
data.push(data.reduce((prev, curr) => { | |
if (getMinut(curr) > 5) { | |
prev.push(curr); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect, useRef } from 'react'; | |
// import { HideUntilLoaded } from 'react-animation'; | |
import PropTypes from 'prop-types'; | |
import Spinner from '../spinner/Spinner'; | |
import ErrorMessage from '../errorMessage/ErrorMessage'; | |
import MarvelServices from '../services/MarvelServices'; | |
import './charlist.scss'; |
A Pen by David Piruzashvili on CodePen.