import Meta from "./Meta"; import {Container, Nav, Navbar, NavDropdown} from "react-bootstrap"; import {useContext} from "react"; import {UserContext} from "../utils/userContenxt"; import jsCookie from "js-cookie"; import Router from "next/router"; export const Layout = ({children}) => { const {user} = useContext(UserContext) if (user === undefined) return (<> {children} >) const {menu} = user function handleLogout() { localStorage.removeItem('u') jsCookie.set('token', '') Router.push('/login') } return (<>React-Bootstrap {children} >) }
2021年12月4日星期六
components/Layout.js
订阅:
博文评论 (Atom)
-
import '../styles/globals.css' import 'bootstrap/dist/css/bootstrap.min.css'; import 'react-toastify/dist/ReactToastif...
-
sudo apt update sudo apt install openjdk-11-jdk java -version
-
心情 伤心 万念俱灰 伤心欲绝 五内如焚 肝肠寸断 触景伤心 闷闷不乐 哭泣 泣不成声 泪如雨下 抱头大哭 撕心裂肺 哀天叫地 着急 心急如焚 坐立不安
没有评论:
发表评论