diff --git a/website/components/FunctionCard/FunctionCard.js b/website/components/FunctionCard/FunctionCard.js index 40169e2..8fe7bc3 100644 --- a/website/components/FunctionCard/FunctionCard.js +++ b/website/components/FunctionCard/FunctionCard.js @@ -2,8 +2,8 @@ import Link from 'next/link'; import { useState, forwardRef } from 'react'; import date from 'date-and-time'; import Loader from '../Loader'; -import './FunctionCard.css'; import { API_URL } from '../../utils/config/config'; +import './FunctionCard.css'; const FunctionCard = forwardRef((props, ref) => { diff --git a/website/pages/functions/chronometerTimer.js b/website/pages/functions/chronometerTimer.js index afad93a..6679d1a 100644 --- a/website/pages/functions/chronometerTimer.js +++ b/website/pages/functions/chronometerTimer.js @@ -10,7 +10,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faPlay, faPause, faSync } from '@fortawesome/free-solid-svg-icons'; import api from '../../utils/api'; import '../../public/css/pages/FunctionComponent.css'; -import '../../components/FunctionCard/FunctionCard.css'; import '../../public/css/pages/functions/chronometerTimer.css'; let interval; @@ -18,12 +17,12 @@ function convertSeconds(seconds) { return { minutes: Math.floor(seconds / 60), seconds: seconds % 60 - } + }; } const Chronometer = () => { - const [timeLength, setTimeLength] = useState(0); // seconds + const [timeLength, setTimeLength] = useState(0); // seconds const [isPlaying, setIsPlaying] = useState(false); const handlePlayPause = () => { diff --git a/website/pages/functions/randomQuote.js b/website/pages/functions/randomQuote.js index efb3ad3..58826c2 100644 --- a/website/pages/functions/randomQuote.js +++ b/website/pages/functions/randomQuote.js @@ -14,7 +14,6 @@ import api from '../../utils/api'; import copyToClipboard from '../../utils/copyToClipboard'; import 'notyf/notyf.min.css'; import '../../public/css/pages/FunctionComponent.css'; -import '../../components/FunctionCard/FunctionCard.css'; const GenerateQuote = () => { diff --git a/website/pages/functions/rightPrice.js b/website/pages/functions/rightPrice.js index 1c28fe8..b31d462 100644 --- a/website/pages/functions/rightPrice.js +++ b/website/pages/functions/rightPrice.js @@ -7,7 +7,6 @@ import FunctionComments from '../../components/FunctionPage/FunctionComments/Fun import Loader from '../../components/Loader'; import api from '../../utils/api'; import '../../public/css/pages/FunctionComponent.css'; -import '../../components/FunctionCard/FunctionCard.css'; import '../../public/css/pages/functions/rightPrice.css'; const PlayRightPrice = () => { @@ -140,7 +139,7 @@ const rightPrice = (props) => ( ); diff --git a/website/pages/functions/toDoList.js b/website/pages/functions/toDoList.js index 26510bd..ef0d536 100644 --- a/website/pages/functions/toDoList.js +++ b/website/pages/functions/toDoList.js @@ -10,7 +10,6 @@ import FunctionArticle from '../../components/FunctionPage/FunctionArticle'; import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments'; import api from '../../utils/api'; import '../../public/css/pages/FunctionComponent.css'; -import '../../components/FunctionCard/FunctionCard.css'; import '../../public/css/pages/functions/toDoList.css'; const ManageToDo = () => { diff --git a/website/utils/copyToClipboard.js b/website/utils/copyToClipboard.js index aa22b82..86c4044 100644 --- a/website/utils/copyToClipboard.js +++ b/website/utils/copyToClipboard.js @@ -1,10 +1,10 @@ function copyToClipboard(text) { - const elem = document.createElement('textarea'); - elem.value = text; - document.body.appendChild(elem); - elem.select(); + const element = document.createElement('textarea'); + element.value = text; + document.body.appendChild(element); + element.select(); document.execCommand('copy'); - document.body.removeChild(elem); + document.body.removeChild(element); } export default copyToClipboard; \ No newline at end of file