mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
added FollowersList
This commit is contained in:
parent
c4c3defc4a
commit
925e5ee673
26
packages/app/src/components/FollowersList/index.jsx
Normal file
26
packages/app/src/components/FollowersList/index.jsx
Normal file
@ -0,0 +1,26 @@
|
||||
import React from "react"
|
||||
import * as antd from "antd"
|
||||
import { Icons } from "components/Icons"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
export default (props) => {
|
||||
if (props.followers.length === 0) {
|
||||
return <antd.Result
|
||||
icon={<Icons.UserX style={{ fontSize: "50px" }} />}
|
||||
>
|
||||
<h2>
|
||||
It's seems this user has no followers, yet.
|
||||
</h2>
|
||||
<h3>
|
||||
Maybe you can help them out?
|
||||
</h3>
|
||||
</antd.Result>
|
||||
}
|
||||
|
||||
return props.followers.map((follower) => {
|
||||
return <div>
|
||||
{follower.username}
|
||||
</div>
|
||||
})
|
||||
}
|
33
packages/app/src/components/FollowersList/index.less
Normal file
33
packages/app/src/components/FollowersList/index.less
Normal file
@ -0,0 +1,33 @@
|
||||
@borderRadius: 12px;
|
||||
|
||||
.ant-result {
|
||||
display : flex;
|
||||
flex-direction: column;
|
||||
align-items : center;
|
||||
}
|
||||
|
||||
.ant-result-icon {
|
||||
background-color: var(--background-color-accent);
|
||||
border-radius : @borderRadius;
|
||||
width : fit-content;
|
||||
padding : 20px;
|
||||
|
||||
svg {
|
||||
margin: 0;
|
||||
color : var(--background-color-contrast);
|
||||
}
|
||||
}
|
||||
|
||||
.ant-result-content {
|
||||
background-color: var(--background-color-accent);
|
||||
border-radius : @borderRadius;
|
||||
|
||||
h2 {
|
||||
color: var(--background-color-contrast);
|
||||
}
|
||||
|
||||
h3 {
|
||||
color : var(--background-color-contrast);
|
||||
font-weight: 100;
|
||||
}
|
||||
}
|
@ -32,6 +32,9 @@ export { default as PostsFeed } from "./PostsFeed"
|
||||
export { default as PostCard } from "./PostCard"
|
||||
export { default as PostCreator } from "./PostCreator"
|
||||
|
||||
// USERS
|
||||
export { default as FollowersList } from "./FollowersList"
|
||||
|
||||
// OTHERS
|
||||
export * as AdminTools from "./AdminTools"
|
||||
export * as AboutApp from "./AboutApp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user