👌 IMPROVE: Frontend refactoring, fixes etc

This commit is contained in:
Divlo 2020-05-01 21:01:03 +02:00
parent c36b0a46ab
commit 650bcac05a
6 changed files with 9 additions and 13 deletions

View File

@ -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) => {

View File

@ -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,7 +17,7 @@ function convertSeconds(seconds) {
return {
minutes: Math.floor(seconds / 60),
seconds: seconds % 60
}
};
}
const Chronometer = () => {

View File

@ -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 = () => {

View File

@ -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"]}
/>
);

View File

@ -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 = () => {

View File

@ -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;