From c6c994dc5cbbdae60dcc7dcc2ad95dc0580fb7d9 Mon Sep 17 00:00:00 2001 From: Gideon Pinto Date: Thu, 18 Apr 2024 08:41:49 -0400 Subject: [PATCH] feat: Disable the create feed button for unauthenticated users (#1159) --- src/components/CreateFeed/CreateFeed.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/CreateFeed/CreateFeed.tsx b/src/components/CreateFeed/CreateFeed.tsx index dca1a8a1e..ead51381d 100644 --- a/src/components/CreateFeed/CreateFeed.tsx +++ b/src/components/CreateFeed/CreateFeed.tsx @@ -28,6 +28,7 @@ import { createFeed, createFeedInstanceWithFS } from "./createFeedHelper"; import { Types } from "./types/feed"; export default function CreateFeed() { + const isLoggedIn = useTypedSelector((state) => state.user.isLoggedIn); const [feedProcessing, setFeedProcessing] = React.useState(false); const queryClient = useQueryClient(); const router = useContext(MainRouterContext); @@ -215,6 +216,7 @@ export default function CreateFeed() { icon={} variant="primary" onClick={() => closeWizard()} + isDisabled={!isLoggedIn} > Create Feed