{loading ? (
@@ -127,12 +111,7 @@ const Main = () => {
{pagination.movies.map((item) => (
-
diff --git a/src/axiosConfig.js b/src/axiosConfig.js
deleted file mode 100644
index 0519ecb..0000000
--- a/src/axiosConfig.js
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/Bar.jsx b/src/components/Bar.jsx
new file mode 100644
index 0000000..69151fc
--- /dev/null
+++ b/src/components/Bar.jsx
@@ -0,0 +1,39 @@
+import React, { useContext } from 'react';
+import AppBar from '@mui/material/AppBar';
+import Avatar from '@mui/material/Avatar';
+import Box from '@mui/material/Box';
+import IconButton from '@mui/material/IconButton';
+import Toolbar from '@mui/material/Toolbar';
+import Typography from '@mui/material/Typography';
+import ExitToAppIcon from '@mui/icons-material/ExitToApp';
+import { default as VuetifyLogo } from '../logo.svg';
+import { AuthContext } from '../AuthContext';
+
+const Bar = () => {
+ const { username, handleLogout } = useContext(AuthContext);
+
+ return (
+
+
+
+
+
+
+
+ {username && (
+
+ {username.charAt(0).toUpperCase()}
+
+ {username}
+
+
+ )}
+
+
+
+
+
+ );
+};
+
+export default Bar;
\ No newline at end of file
diff --git a/src/CategoryNav.js b/src/components/CategoryNav.jsx
similarity index 100%
rename from src/CategoryNav.js
rename to src/components/CategoryNav.jsx
diff --git a/src/LoginForm.js b/src/components/LoginForm.jsx
similarity index 98%
rename from src/LoginForm.js
rename to src/components/LoginForm.jsx
index 574eac3..180f559 100644
--- a/src/LoginForm.js
+++ b/src/components/LoginForm.jsx
@@ -1,7 +1,7 @@
// LoginForm.js
import React, { useContext, useState } from 'react';
import axios from 'axios';
-import ConfigContext from './Config';
+import ConfigContext from '../Config';
import { useNavigate } from 'react-router-dom';
import {
Box,
diff --git a/src/MovieCard.js b/src/components/MovieCard.jsx
similarity index 100%
rename from src/MovieCard.js
rename to src/components/MovieCard.jsx
diff --git a/src/VideoPlayer.js b/src/components/VideoPlayer.jsx
similarity index 94%
rename from src/VideoPlayer.js
rename to src/components/VideoPlayer.jsx
index 2297427..9d49bfb 100644
--- a/src/VideoPlayer.js
+++ b/src/components/VideoPlayer.jsx
@@ -2,7 +2,7 @@ import {React, useContext} from 'react';
import { useParams } from 'react-router-dom';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
-import ConfigContext from './Config';
+import ConfigContext from '../Config';
diff --git a/src/index.js b/src/index.jsx
similarity index 72%
rename from src/index.js
rename to src/index.jsx
index c34ba83..aab5116 100644
--- a/src/index.js
+++ b/src/index.jsx
@@ -3,10 +3,8 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
-import { BrowserRouter,Router, Routes, Route} from 'react-router-dom';
-import LoginForm from './LoginForm';
-import Main from './Main';
-import VideoPlayer from './VideoPlayer'; // 导入我们将创建的VideoPlayer组件
+import { BrowserRouter } from 'react-router-dom';
+
const root = ReactDOM.createRoot(document.getElementById('root'));