Skip to content

Commit

Permalink
Solucionado error ruta index + añadido NavBarGame.
Browse files Browse the repository at this point in the history
  • Loading branch information
UO288559 committed Apr 15, 2024
1 parent f28bec5 commit 9de0dfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useCallback, useState} from 'react';
import { useNavigate, useLocation } from 'react-router-dom';
import { AppBar, Button, Grid } from '@mui/material';
import { useUser } from './UserContext';
import { useUser } from '../UserContext';
import axios from 'axios';

const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000';
Expand Down Expand Up @@ -36,7 +36,7 @@ const NavigationBar_Game = () => {
{/* Columna izquierda */}
<Grid item>
<Button variant="contained" color="inherit" style={{ background: '#9A77B0', border: 'none', padding: 0, marginRight: '10px', marginLeft: '10px'}} onClick={showHome}>
<img src={require('./images/home.png')} style={{ width: '50px', height: '50px' }} alt="Imagen home"/>
<img src={require('../images/home.png')} style={{ width: '50px', height: '50px' }} alt="Imagen home"/>
</Button>
</Grid>
</Grid>
Expand Down
6 changes: 4 additions & 2 deletions webapp/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import NavigationBar from './components/NavigationBar';
import NavigationBar from './components/fragments/NavigationBar';
import NavigationBar_Game from './components/fragments/NavigationBar_Game';
import reportWebVitals from './reportWebVitals';
import { UserProvider } from './components/UserContext';

Expand All @@ -25,7 +26,8 @@ root.render(
<React.StrictMode>
<UserProvider>
<Router>
<NavigationBar />
<NavigationBar />
<NavigationBar_Game/>
<Routes>
<Route path="/" element={<App/>}></Route>
<Route path="/PantallaInicio" element={<PantallaInicio/>}></Route>
Expand Down

0 comments on commit 9de0dfd

Please sign in to comment.