mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-07 23:54:10 +08:00
首页。最近学习页懒加载
This commit is contained in:
parent
950fc74371
commit
e04d63125a
@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import styles from "./index.module.scss";
|
import styles from "./index.module.scss";
|
||||||
import { Modal, Button, Dropdown } from "antd";
|
import { Modal, Button, Dropdown, Image } from "antd";
|
||||||
import type { MenuProps } from "antd";
|
import type { MenuProps } from "antd";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||||
@ -217,9 +217,11 @@ export const Header: React.FC = () => {
|
|||||||
<div className="d-flex" style={{ cursor: "pointer" }}>
|
<div className="d-flex" style={{ cursor: "pointer" }}>
|
||||||
{user && user.name && (
|
{user && user.name && (
|
||||||
<>
|
<>
|
||||||
<img
|
<Image
|
||||||
|
loading="lazy"
|
||||||
style={{ width: 36, height: 36, borderRadius: "50%" }}
|
style={{ width: 36, height: 36, borderRadius: "50%" }}
|
||||||
src={user.avatar}
|
src={user.avatar}
|
||||||
|
preview={false}
|
||||||
/>
|
/>
|
||||||
<span className="ml-8 c-admin">{user.name}</span>
|
<span className="ml-8 c-admin">{user.name}</span>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user