mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
use array map
This commit is contained in:
parent
db67e19efe
commit
90b935cd6d
@ -6,8 +6,6 @@ import PostCard from "components/PostCard"
|
||||
import PlaylistTimelineEntry from "components/Music/PlaylistTimelineEntry"
|
||||
import LoadMore from "components/LoadMore"
|
||||
|
||||
import { For } from "million/react"
|
||||
|
||||
import PostModel from "models/post"
|
||||
|
||||
import "./index.less"
|
||||
@ -77,7 +75,20 @@ const PostList = (props) => {
|
||||
</div>
|
||||
}
|
||||
|
||||
<For
|
||||
{
|
||||
props.list.map((data) => {
|
||||
return <Entry
|
||||
key={data._id}
|
||||
data={data}
|
||||
onLikePost={props.onLikePost}
|
||||
onSavePost={props.onSavePost}
|
||||
onDeletePost={props.onDeletePost}
|
||||
onEditPost={props.onEditPost}
|
||||
/>
|
||||
})
|
||||
}
|
||||
|
||||
{/* <For
|
||||
each={props.list}
|
||||
style={{
|
||||
height: `100%`,
|
||||
@ -95,7 +106,7 @@ const PostList = (props) => {
|
||||
onEditPost={props.onEditPost}
|
||||
/>
|
||||
}
|
||||
</For>
|
||||
</For> */}
|
||||
</LoadMore>
|
||||
}
|
||||
|
||||
@ -160,6 +171,7 @@ export class PostsListsComponent extends React.Component {
|
||||
|
||||
let payload = {
|
||||
trim: this.state.list.length,
|
||||
limit: app.cores.settings.get("feed_max_fetch"),
|
||||
}
|
||||
|
||||
if (this.props.loadFromModelProps) {
|
||||
|
@ -73,55 +73,36 @@ html {
|
||||
//margin: auto;
|
||||
z-index: 150;
|
||||
|
||||
slot {
|
||||
slot {
|
||||
.post_card {
|
||||
border-radius: 0;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
}
|
||||
|
||||
.playlistTimelineEntry {
|
||||
border-radius: 0;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
}
|
||||
}
|
||||
.post_card {
|
||||
border-radius: 0;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
|
||||
&:first-child {
|
||||
slot {
|
||||
.post_card {
|
||||
border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
|
||||
.playlistTimelineEntry {
|
||||
border-radius: 8px;
|
||||
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
}
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
slot {
|
||||
.post_card {
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.playlistTimelineEntry {
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
.playlistTimelineEntry {
|
||||
border-radius: 0;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user