Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
elinteli committed Jun 19, 2024
1 parent b8b0e4a commit 5a48e77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ body {
height: 100%;
overflow-x: hidden;
}
html {
scroll-behavior: smooth;
}
* {
margin: 0;
}
Expand Down
7 changes: 7 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useEffect } from 'react';
import { Route, Link, BrowserRouter, Routes } from 'react-router-dom';
import './App.css';
import Inicio from './Inicio';
Expand All @@ -11,6 +12,12 @@ import imgIcono from './img/icono.png';

// Componente principal de la aplicación
export default function App() {
useEffect(() => {
window.scroll(0, 0);
document.querySelector("header").addEventListener("click", function () {
window.scroll(0, 0);
});
})
return (
<article class="main">
<BrowserRouter>
Expand Down

0 comments on commit 5a48e77

Please sign in to comment.