视频播放页面顶部优化

This commit is contained in:
禺狨 2023-05-08 09:59:48 +08:00
parent f5ba28c435
commit 7666e64f78
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,12 @@
import React from "react";
import { getToken } from "../../utils/index";
import { Navigate } from "react-router-dom";
interface PropInterface {
Component: any;
}
const PrivateRoute: React.FC<PropInterface> = ({ Component }) => {
return getToken() ? Component : <Navigate to="/login" replace={true} />;
};
export default PrivateRoute;

View File

@ -12,7 +12,8 @@
right: 0;
width: 100%;
height: 60px;
background: rgba(255, 255, 255, 0.1);
background: #262634;
z-index: 100;
.box {
width: 62.5%;
height: 60px;