From 5dff89a69dfb4e1d6d4233739c8a086616b1ca4b Mon Sep 17 00:00:00 2001 From: Juanant98 Date: Sun, 7 Mar 2021 14:50:25 +0100 Subject: [PATCH] Mejorada estructura de componentes para aumentar la legibilidad. Arreglado error de camelCase en carpeta Componentes --- src/App.tsx | 20 ++--- src/Components/backtotop.tsx | 5 +- src/Components/bottomwrap.tsx | 27 +++--- src/Components/copyrightwrap.tsx | 2 +- src/Components/footerwrap.tsx | 20 ++--- src/Components/jobComponent.tsx | 23 +++--- src/Components/mainbottomwrap.tsx | 23 ++---- src/Components/navbar.tsx | 33 ++++---- src/Components/newsshow.tsx | 95 +++++++++++---------- src/Components/setWindowDimensions.tsx | 17 ++-- src/Components/slideshow.tsx | 110 ++++++++++++------------- src/containers/navbar.tsx | 2 +- 12 files changed, 184 insertions(+), 193 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b01d230..a4c2745 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,14 +1,14 @@ import NB from './containers/navbar' -import Slideshow from './Components/slideshow' - -import Bottomwrap from './Components/bottomwrap' -import Newsshow from './Components/newsshow' -import JobComponent from './Components/jobComponent' -import useWindowDimensions from './Components/setWindowDimensions' -import Mainbottomwrap from './Components/mainbottomwrap'; -import Backtotop from './Components/backtotop'; -import Footerwrap from './Components/footerwrap'; -import Copyrightwrap from './Components/copyrightwrap'; +import Slideshow from './components/slideshow' + +import Bottomwrap from './components/bottomwrap' +import Newsshow from './components/newsshow' +import JobComponent from './components/jobComponent' +import useWindowDimensions from './components/setWindowDimensions' +import Mainbottomwrap from './components/mainbottomwrap'; +import Backtotop from './components/backtotop'; +import Footerwrap from './components/footerwrap'; +import Copyrightwrap from './components/copyrightwrap'; import { Action, createStore } from 'redux' import IGlobalState, { initialState} from './state/globalState' import { Provider } from 'react-redux' diff --git a/src/Components/backtotop.tsx b/src/Components/backtotop.tsx index 9fe072c..e122832 100644 --- a/src/Components/backtotop.tsx +++ b/src/Components/backtotop.tsx @@ -1,8 +1,9 @@ import React, {useState} from 'react'; -const ScrollArrow = () =>{ +const ScrollButton = () =>{ + //Controlamos con un Hook si debemos mostrar el botón const [showScroll, setShowScroll] = useState(false) const checkScrollTop = () => { @@ -26,4 +27,4 @@ const ScrollArrow = () =>{ ); } -export default ScrollArrow; \ No newline at end of file +export default ScrollButton; \ No newline at end of file diff --git a/src/Components/bottomwrap.tsx b/src/Components/bottomwrap.tsx index f950afe..abbe57a 100644 --- a/src/Components/bottomwrap.tsx +++ b/src/Components/bottomwrap.tsx @@ -3,11 +3,13 @@ import footer1 from '../Inicio_files/img/cita-secretaria.png' import footer2 from '../Inicio_files/img/TFG.png' import footer3 from '../Inicio_files/img/etsiiorienta.png' import footer4 from '../Inicio_files/img/expon-us250A.png' + + class Bottomwrap extends React.Component { public render () { return( -
+

Enlaces de Interés

@@ -31,14 +33,12 @@ class Bottomwrap extends React.Component { ) } } + interface IBottomwrapElementProps { dsihtml: string, classname: string, link: string, img: string, - - - } interface IBottomwrapElementState { @@ -46,7 +46,6 @@ interface IBottomwrapElementState { classname: string, link: string, img: string, - } class BottomwrapElement extends React.Component { @@ -59,15 +58,15 @@ class BottomwrapElement extends React.Component -