From dd6a4121fb1fdeb1fbe08db2bc482196eb81c805 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 24 Dec 2024 17:15:51 +0100 Subject: [PATCH] fix eslint --- src/app.tsx | 2 +- src/components/post-desktop/post-desktop.tsx | 4 ++-- src/components/post-mobile/post-mobile.tsx | 2 +- src/hooks/use-theme.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 73320a6d..38f82e42 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { Outlet, Route, Routes, useLocation, useNavigate, useParams } from 'react-router-dom'; import { useAccountComment, useAccountComments } from '@plebbit/plebbit-react-hooks'; -import { initSnow, removeSnow, shouldShowSnow } from './lib/snow'; +import { initSnow, removeSnow } from './lib/snow'; import { isAllView, isSubscriptionsView } from './lib/utils/view-utils'; import useIsMobile from './hooks/use-is-mobile'; import useTheme from './hooks/use-theme'; diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index 3ad979d6..221dc1ad 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -216,7 +216,7 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }: const PostMedia = ({ post, hasThumbnail }: PostProps) => { const { t } = useTranslation(); - const { link, spoiler, cid } = post || {}; + const { spoiler, cid } = post || {}; // Reset state by remounting component when post changes return ; @@ -470,7 +470,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies )}
- {shouldShowSnow() && hasThumbnail && } + {shouldShowSnow() && hasThumbnail && } {link && !isHidden && !(deleted || removed) && isValidURL(link) && } {!isHidden && !content && !(deleted || removed) &&
} diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index 7c7f013d..debb4e96 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -407,7 +407,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies = data-author-address={author?.shortAddress} data-post-cid={postCid} > - {shouldShowSnow() && } + {shouldShowSnow() && }
diff --git a/src/hooks/use-theme.ts b/src/hooks/use-theme.ts index 3c19aded..01da2447 100644 --- a/src/hooks/use-theme.ts +++ b/src/hooks/use-theme.ts @@ -50,7 +50,7 @@ const useTheme = (): [string, (theme: string) => void] => { setCurrentTheme('tomorrow'); updateThemeClass('tomorrow'); } - }, [isEnabled, setIsEnabled, params, pendingPostSubplebbitAddress, location.pathname]); + }, [isEnabled, setIsEnabled, params, pendingPostSubplebbitAddress, location.pathname, isInAllView, isInSubscriptionsView]); const getCurrentTheme = useCallback(() => { const { isEnabled } = useSpecialThemeStore.getState();