From 9de0dfda9569fd4579d5abc5a0cff485399aa636 Mon Sep 17 00:00:00 2001 From: UO288559 Date: Mon, 15 Apr 2024 20:37:43 +0200 Subject: [PATCH] =?UTF-8?q?Solucionado=20error=20ruta=20index=20+=20a?= =?UTF-8?q?=C3=B1adido=20NavBarGame.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/src/components/{ => fragments}/NavigationBar_Game.js | 4 ++-- webapp/src/index.js | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) rename webapp/src/components/{ => fragments}/NavigationBar_Game.js (89%) diff --git a/webapp/src/components/NavigationBar_Game.js b/webapp/src/components/fragments/NavigationBar_Game.js similarity index 89% rename from webapp/src/components/NavigationBar_Game.js rename to webapp/src/components/fragments/NavigationBar_Game.js index 8f378b7d..07317052 100644 --- a/webapp/src/components/NavigationBar_Game.js +++ b/webapp/src/components/fragments/NavigationBar_Game.js @@ -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'; @@ -36,7 +36,7 @@ const NavigationBar_Game = () => { {/* Columna izquierda */} diff --git a/webapp/src/index.js b/webapp/src/index.js index 451b2cc2..22bfedac 100644 --- a/webapp/src/index.js +++ b/webapp/src/index.js @@ -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'; @@ -25,7 +26,8 @@ root.render( - + + }> }>