Skip to content
Snippets Groups Projects
Commit 6cc45a39 authored by Lukas's avatar Lukas
Browse files

Update comments page

parent dc4cfae3
No related branches found
No related tags found
1 merge request!494Lbudginas/#392 part1 reduce searches component
Pipeline #111288 failed
......@@ -9,10 +9,8 @@ import {
convertCommentsOperationResultToTableOperations,
} from "@/lib/utils";
import useCommentSearch from "@/hooks/api/common/useCommentSearch";
import useOperationTypes from "@/hooks/api/common/useOperationsTypes";
import useOperationsFormatter from "@/hooks/common/useOperationsFormatter";
import useURLParams from "@/hooks/common/useURLParams";
import useSearchRanges from "@/hooks/common/useSearchRanges";
import CustomPagination from "@/components/CustomPagination";
import JumpToPage from "@/components/JumpToPage";
import CommentsSearch from "@/components/home/searches/CommentsSearch";
......@@ -43,8 +41,6 @@ const Comments: React.FC = () => {
Explorer.CommentSearchProps | undefined
>(undefined);
const searchRanges = useSearchRanges();
const commentSearch = useCommentSearch(formatSearchProps(commentSearchProps));
const { paramsState, setParams } = useURLParams(defaultSearchParams, [
"accountName",
......@@ -55,11 +51,6 @@ const Comments: React.FC = () => {
commentSearch?.commentSearchData
) as Hive.CommentOperationResponse;
const operationsTypes =
useOperationTypes().operationsTypes?.filter((operation) =>
config.commentOperationsTypeIds.includes(operation.op_type_id)
) || [];
const startCommentSearch = async (props: Explorer.CommentSearchParams) => {
if (!!props.accountName) {
const searchProps = {
......@@ -111,13 +102,7 @@ const Comments: React.FC = () => {
>
<Card>
<CardContent className="pt-2">
<CommentsSearch
startCommentsSearch={startCommentSearch}
operationsTypes={operationsTypes}
data={paramsState}
loading={commentSearch.commentSearchDataLoading}
searchRanges={searchRanges}
/>
<CommentsSearch />
</CardContent>
</Card>
{commentSearch.commentSearchData && (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment