mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14: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 { Swiper } from "antd-mobile"
|
||||
import { Icons } from "components/Icons"
|
||||
import { LikeButton } from "components"
|
||||
import { Image, LikeButton } from "components"
|
||||
import moment from "moment"
|
||||
import classnames from "classnames"
|
||||
import loadable from "@loadable/component"
|
||||
@ -52,7 +52,10 @@ function PostHeader(props) {
|
||||
return <div className="postHeader">
|
||||
<div className="userInfo">
|
||||
<div className="avatar">
|
||||
<antd.Avatar shape="square" src={props.postData.user?.avatar} />
|
||||
<Image
|
||||
alt="Avatar"
|
||||
src={props.postData.user?.avatar}
|
||||
/>
|
||||
</div>
|
||||
<div className="info">
|
||||
<div>
|
||||
|
@ -52,6 +52,19 @@
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
img {
|
||||
object-fit: cover;
|
||||
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
|
@ -4,7 +4,7 @@ import classnames from "classnames"
|
||||
import moment from "moment"
|
||||
|
||||
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 "./index.less"
|
||||
@ -154,7 +154,10 @@ export default class Account extends React.Component {
|
||||
<div className="title">
|
||||
<div className="field">
|
||||
<div className="avatar">
|
||||
<img src={user.avatar} />
|
||||
<Image
|
||||
alt="ProfileImage"
|
||||
src={user.avatar}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user