👌 IMPROVE: Frontend refactoring, fixes etc
This commit is contained in:
parent
c36b0a46ab
commit
650bcac05a
@ -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) => {
|
||||
|
||||
|
@ -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 = () => {
|
||||
|
@ -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 = () => {
|
||||
|
||||
|
@ -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) => (
|
||||
<FunctionPage
|
||||
FunctionTabManager={FunctionTabManager}
|
||||
{ ...props }
|
||||
tabNames={["⚙️ Utilisation", "📝 Article", "📬 Commentaires"]}
|
||||
tabNames={["🕹️ Jouer", "📝 Article", "📬 Commentaires"]}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -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 = () => {
|
||||
|
@ -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;
|
Reference in New Issue
Block a user