From 5a41b0364ebb697475fe035578dfc9dddadb20cc Mon Sep 17 00:00:00 2001 From: rooki Date: Mon, 8 Jan 2024 08:08:49 +0100 Subject: [PATCH] Moved comment, changed type and removed optional chaining --- src/components/button/index.tsx | 2 +- src/components/front-page-feed/index.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index e7c1491..61da04d 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -3,7 +3,7 @@ import cx from 'classnames'; interface ButtonProps { children: React.ReactNode; - type: 'button' | 'submit' | 'reset' | undefined; + type: 'button' | 'submit' | 'reset'; id?: string; ariaLabel?: string; active?: boolean; diff --git a/src/components/front-page-feed/index.tsx b/src/components/front-page-feed/index.tsx index 5fd43b7..c2c98d0 100644 --- a/src/components/front-page-feed/index.tsx +++ b/src/components/front-page-feed/index.tsx @@ -16,14 +16,14 @@ interface FeedProps { } const Feed = ({ posts }: FeedProps) => { - // @todo: Allow test data when in non-docker dev env - // as Sublinks Core doesn't yet handle all post features const [postFeed, setPostFeed] = useState(posts); // @todo: Set this to the users default feed type const [postFeedType, setPostFeedType] = useState(); const [postFeedSort, setPostFeedSort] = useState(); + // @todo: Allow test data when in non-docker dev env + // as Sublinks Core doesn't yet handle all post features useEffect(() => { async function getPosts() { setPostFeed(process.env.SUBLINKS_API_BASE_URL ? await sublinksClient().getPosts({ @@ -44,7 +44,7 @@ const Feed = ({ posts }: FeedProps) => { currentSort={postFeedSort} /> - + ); };