From 15cce42d5e8b1aa99b9296fd8574584e93ce7702 Mon Sep 17 00:00:00 2001 From: kevkevinpal Date: Tue, 31 Oct 2023 13:40:20 -0500 Subject: [PATCH] fix: sort by date and removed thing that made build fail --- src/components/AddSourceModal/SourceStep/index.tsx | 4 ---- .../SourcesTableModal/SourcesView/Topics/Table/index.tsx | 2 +- src/stores/useTopicsStore/index.ts | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/AddSourceModal/SourceStep/index.tsx b/src/components/AddSourceModal/SourceStep/index.tsx index abaab8f79..f1bcc73c0 100644 --- a/src/components/AddSourceModal/SourceStep/index.tsx +++ b/src/components/AddSourceModal/SourceStep/index.tsx @@ -4,7 +4,6 @@ import styled from 'styled-components' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' import { TextInput } from '~/components/common/TextInput' -import { requiredRule } from '~/constants' type Props = { onNextStep: () => void @@ -25,9 +24,6 @@ export const SourceStep: FC = ({ onNextStep, value }) => ( maxLength={50} name="source" placeholder="Paste your url here..." - rules={{ - ...requiredRule, - }} /> diff --git a/src/components/SourcesTableModal/SourcesView/Topics/Table/index.tsx b/src/components/SourcesTableModal/SourcesView/Topics/Table/index.tsx index 971e56cab..17bb3ae68 100644 --- a/src/components/SourcesTableModal/SourcesView/Topics/Table/index.tsx +++ b/src/components/SourcesTableModal/SourcesView/Topics/Table/index.tsx @@ -61,7 +61,7 @@ const Table: React.FC = ({ data, showMuted, setSelectedTopic }) return ( - {i.topic.replace(/\n/g, '')} + {i.topic} {i.edgeCount} {i.edgeList.map((topic) => ( diff --git a/src/stores/useTopicsStore/index.ts b/src/stores/useTopicsStore/index.ts index 3191f1a61..0fbafee87 100644 --- a/src/stores/useTopicsStore/index.ts +++ b/src/stores/useTopicsStore/index.ts @@ -1,5 +1,5 @@ import create from 'zustand' -import { ALPHABETICALLY } from '~/components/SourcesTableModal/SourcesView/constants' +import { DATE } from '~/components/SourcesTableModal/SourcesView/constants' import { TtopicsParams, getTopicsData } from '~/network/fetchSourcesData' import { FetchTopicResponse, Topic, TopicFilter } from '~/types' @@ -19,7 +19,7 @@ const defaultData: Omit = total: 0, filters: { muted: false, - sortBy: ALPHABETICALLY, + sortBy: DATE, page: 0, pageSize: 50, },