Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Tidy up of some stuff

Matt Robertsc879c31cfb57
diff --git a/public/pages/ShowPost/ShowPost.page.tsx b/public/pages/ShowPost/ShowPost.page.tsx
index 1b9b0c2bb..ba8ac8e64 100644
--- a/public/pages/ShowPost/ShowPost.page.tsx
+++ b/public/pages/ShowPost/ShowPost.page.tsx
@@ -19,14 +19,10 @@ import {
ImageViewer,
Icon,
Header,
- // PoweredByFider,
+ PoweredByFider,
Avatar,
Dropdown,
} from "@fider/components"
-// import { ResponseForm } from "./components/ResponseForm"
-// import { TagsPanel } from "./components/TagsPanel"
-// import { NotificationsPanel } from "./components/NotificationsPanel"
-// import { ModerationPanel } from "./components/ModerationPanel"
import { DiscussionPanel } from "./components/DiscussionPanel"
import IconX from "@fider/assets/images/heroicons-x.svg"
@@ -227,11 +223,6 @@ export default class ShowPostPage extends React.Component<ShowPostPageProps, Sho
)}
</HStack>
- {/* {this.props.post.status !== "open" && (
- <div className="mb-4">
- <ResponseLozenge status={this.props.post.status} response={this.props.post.response} />
- </div>
- )} */}
<div className="flex-grow">
{this.state.editMode ? (
<Form error={this.state.error}>
@@ -307,8 +298,7 @@ export default class ShowPostPage extends React.Component<ShowPostPageProps, Sho
</div>
<div className="p-show-post__action-col">
<VotesPanel post={this.props.post} votes={this.props.votes} />
- {/* <MostWanted /> */}
- {/* <PoweredByFider slot="show-post" className="mt-3" /> */}
+ <PoweredByFider slot="show-post" className="mt-3" />
</div>
</div>
</div>
diff --git a/public/pages/ShowPost/components/MostWanted.tsx b/public/pages/ShowPost/components/MostWanted.tsx
deleted file mode 100644
index 1d133be2c..000000000
--- a/public/pages/ShowPost/components/MostWanted.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from "react"
-import { VStack } from "@fider/components/layout"
-import { actions } from "@fider/services"
-import { Post } from "@fider/models"
-import { Trans } from "@lingui/react"
-
-export const MostWanted = () => {
- const [posts, setPosts] = React.useState<Post[]>([])
-
- React.useEffect(() => {
- const fetchPosts = async () => {
- const result = await actions.searchPosts({ view: "most-wanted", limit: 5 })
- setPosts(result.data)
- }
- fetchPosts()
- }, [])
-
- return (
- <VStack spacing={4}>
- <h1 className="text-title">
- <Trans id="home.postfilter.option.mostwanted">Most Wanted</Trans>
- </h1>
- {posts.length > 0 &&
- posts.map((post) => (
- <div key={post.id} className="pt-1 hover">
- <span className="text-medium">{post.title}</span>
- <div className="pt-1 flex">
- <span className="text-muted" style={{ width: "150px" }}>
- <Trans id="showpost.mostwanted.comments" values={{ count: post.commentsCount }}>
- comments
- </Trans>
- </span>
- <span className="text-muted">
- <Trans id="showpost.mostwanted.votes" values={{ count: post.votesCount }} message="{count, plural, one {# votes} other {# votes}}">
- votes
- </Trans>
- </span>
- </div>
- </div>
- ))}
- </VStack>
- )
-}