mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-12 12:04:16 +00:00
use Image
component
This commit is contained in:
parent
54c5472d86
commit
17596ea54a
@ -2,7 +2,7 @@ import React from "react"
|
|||||||
import * as antd from "antd"
|
import * as antd from "antd"
|
||||||
import { Swiper } from "antd-mobile"
|
import { Swiper } from "antd-mobile"
|
||||||
import { Icons } from "components/Icons"
|
import { Icons } from "components/Icons"
|
||||||
import { LikeButton } from "components"
|
import { Image, LikeButton } from "components"
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import classnames from "classnames"
|
import classnames from "classnames"
|
||||||
import loadable from "@loadable/component"
|
import loadable from "@loadable/component"
|
||||||
@ -52,7 +52,10 @@ function PostHeader(props) {
|
|||||||
return <div className="postHeader">
|
return <div className="postHeader">
|
||||||
<div className="userInfo">
|
<div className="userInfo">
|
||||||
<div className="avatar">
|
<div className="avatar">
|
||||||
<antd.Avatar shape="square" src={props.postData.user?.avatar} />
|
<Image
|
||||||
|
alt="Avatar"
|
||||||
|
src={props.postData.user?.avatar}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="info">
|
<div className="info">
|
||||||
<div>
|
<div>
|
||||||
|
@ -52,6 +52,19 @@
|
|||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
object-fit: cover;
|
||||||
|
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -4,7 +4,7 @@ import classnames from "classnames"
|
|||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
|
|
||||||
import { Icons } from "components/Icons"
|
import { Icons } from "components/Icons"
|
||||||
import { Skeleton, PostsFeed, FollowButton, FollowersList } from "components"
|
import { Image, Skeleton, PostsFeed, FollowButton, FollowersList } from "components"
|
||||||
import { Session, User } from "models"
|
import { Session, User } from "models"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
@ -154,7 +154,10 @@ export default class Account extends React.Component {
|
|||||||
<div className="title">
|
<div className="title">
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<div className="avatar">
|
<div className="avatar">
|
||||||
<img src={user.avatar} />
|
<Image
|
||||||
|
alt="ProfileImage"
|
||||||
|
src={user.avatar}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user