diff --git a/functions/getAllPowerBadgeUsers/index.ts b/functions/getAllPowerBadgeUsers/index.ts deleted file mode 100644 index a091ccb..0000000 --- a/functions/getAllPowerBadgeUsers/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Env } from '../common'; - -export interface PowerBadgeUsersRequest { - empty: undefined; -} - -export const onRequestPost: PagesFunction = async () => { - const endpoint = 'https://api.warpcast.com/v2/power-badge-users'; - const res = await fetch(endpoint, { - method: 'GET', - headers: { 'Content-Type': 'application/json' }, - }); - if (!res.ok) throw new Error('Failed to fetch data'); - - const pbResponse = (await res.json()) as { - result: { fids: number[] }; - }; - return new Response(JSON.stringify(pbResponse)); -}; diff --git a/src/api/channelFeed.api.ts b/src/api/channelFeed.api.ts index 9cd6f7a..8c0f7c5 100644 --- a/src/api/channelFeed.api.ts +++ b/src/api/channelFeed.api.ts @@ -9,7 +9,6 @@ import { getSassyHash, isSassy, SassyHash } from './sassyHash.api'; export interface EnhancedCastObject extends CastObject { amFollowing: boolean; - authorHasPowerBadge: boolean; botOrNotResult: BotOrNotResult; isSassy: boolean; sassyHash?: SassyHash; @@ -25,11 +24,10 @@ interface ChannelFeedRequest { channel?: ChannelObject; pageToken?: string; following: number[]; - powerBadgeUsers: number[]; } export const getEnhancedChannelFeed = async (channelFeedRequestPayload: ChannelFeedRequest): Promise => { - const { channel, fid, pageToken, following, powerBadgeUsers } = channelFeedRequestPayload; + const { channel, fid, pageToken, following } = channelFeedRequestPayload; if (!channel) return { casts: [] }; const cronFeed = await getCronFeed({ channelId: channel.id, pageSize: CHANNEL_FEED_PAGESIZE, pageToken }); @@ -47,7 +45,6 @@ export const getEnhancedChannelFeed = async (channelFeedRequestPayload: ChannelF isSassy: isSassy(castObject.text), sassyHash: sassyHashResponses.find((sh) => sh.data.castHash === castObject.hash)?.data, - authorHasPowerBadge: powerBadgeUsers.find((fid) => fid === castObject.author.fid) !== undefined, botOrNotResult: botOrNotResponse.fids.find((fid) => fid.fid === castObject.author.fid)?.result ?? { label: '', summary: '', diff --git a/src/api/followingFeed.api.ts b/src/api/followingFeed.api.ts index 82be9e1..039f074 100644 --- a/src/api/followingFeed.api.ts +++ b/src/api/followingFeed.api.ts @@ -40,13 +40,12 @@ export const getFollowingFeed = (followingFeedRequestPayload: FollowingFeedReque interface EnhancedFollowingFeedRequest { fid: number; pageToken?: string; - powerBadgeUsers: number[]; allChannels: ChannelObject[]; } export const getEnhancedFollowingFeed = async ( homeFeedRequestPayload: EnhancedFollowingFeedRequest, ): Promise => { - const { fid, pageToken, powerBadgeUsers, allChannels } = homeFeedRequestPayload; + const { fid, pageToken, allChannels } = homeFeedRequestPayload; const cronFeed = await getFollowingFeed({ fid: fid, pageSize: FOLLOWING_FEED_PAGESIZE, pageToken }); const seenFids = sift(cronFeed.casts.map((cast) => cast.author.fid).filter((fid) => fid !== null)); @@ -63,7 +62,6 @@ export const getEnhancedFollowingFeed = async ( isSassy: isSassy(castObject.text), sassyHash: sassyHashResponses.find((sh) => sh.data.castHash === castObject.hash)?.data, - authorHasPowerBadge: powerBadgeUsers.find((fid) => fid === castObject.author.fid) !== undefined, botOrNotResult: botOrNotResponse.fids.find((fid) => fid.fid === castObject.author.fid)?.result ?? { label: '', summary: '', diff --git a/src/api/forYouFeed.api.ts b/src/api/forYouFeed.api.ts index 680528f..22e6f34 100644 --- a/src/api/forYouFeed.api.ts +++ b/src/api/forYouFeed.api.ts @@ -22,13 +22,12 @@ interface EnhancedForYouFeedRequest { fid: number; cursor?: string; following: number[]; - powerBadgeUsers: number[]; allChannels: ChannelObject[]; } export const getEnhancedForYouFeed = async ( homeFeedRequestPayload: EnhancedForYouFeedRequest, ): Promise => { - const { fid, cursor, following, powerBadgeUsers, allChannels } = homeFeedRequestPayload; + const { fid, cursor, following, allChannels } = homeFeedRequestPayload; const forYouFeed = await getNeynarOpenrankForYouFeed({ fid: fid, limit: FORYOU_FEED_PAGESIZE, cursor }); const seenFids = sift(forYouFeed.casts.map((cast) => cast.author.fid).filter((fid) => fid !== null)); @@ -45,7 +44,6 @@ export const getEnhancedForYouFeed = async ( isSassy: isSassy(castObject.text), sassyHash: sassyHashResponses.find((sh) => sh.data.castHash === castObject.hash)?.data, - authorHasPowerBadge: powerBadgeUsers.find((fid) => fid === castObject.author.fid) !== undefined, botOrNotResult: botOrNotResponse.fids.find((fid) => fid.fid === castObject.author.fid)?.result ?? { label: '', summary: '', diff --git a/src/api/mocks/mockornot.ts b/src/api/mocks/mockornot.ts index f8adb8a..ddb33f4 100644 --- a/src/api/mocks/mockornot.ts +++ b/src/api/mocks/mockornot.ts @@ -12,7 +12,6 @@ // import './hubReactionsByFid.api.mock'; // import './metadata.api.mock'; // import './neynarReactionsByFid.api.mock'; -// import './powerbadge.api.mock'; // import './reactionOnHash.api.mock'; // import './reactionsByHash.api.mock'; // import './sassyHash.api.mock'; diff --git a/src/api/mocks/powerbadge.api.mock.ts b/src/api/mocks/powerbadge.api.mock.ts deleted file mode 100644 index 5693c16..0000000 --- a/src/api/mocks/powerbadge.api.mock.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { httpApiMock } from '@app/api/mocks/http.api.mock'; - -httpApiMock.onPost('getAllPowerBadgeUsers').reply(200, { - result: { fids: [2, 3, 6546, 15850] }, -}); diff --git a/src/api/powerbadge.api.ts b/src/api/powerbadge.api.ts deleted file mode 100644 index 10085cb..0000000 --- a/src/api/powerbadge.api.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { httpApi } from '@app/api/http.api'; -import './mocks/mockornot'; - -export interface PowerBadgeUsersResponse { - result: { fids: number[] }; -} - -export interface PowerBadgeUsersRequest { - empty: undefined; -} - -export const getAllPowerBadgeUsers = ( - powerBadgeRequestPayload: PowerBadgeUsersRequest, -): Promise => - httpApi - .post('getAllPowerBadgeUsers', { ...powerBadgeRequestPayload }) - .then(({ data }) => data); diff --git a/src/components/apps/cast/Cast.tsx b/src/components/apps/cast/Cast.tsx index 0e8a1a9..0903028 100644 --- a/src/components/apps/cast/Cast.tsx +++ b/src/components/apps/cast/Cast.tsx @@ -25,7 +25,6 @@ export interface CastProps { fid: number; fname: string; embeds: EmbedObject[]; - hasPowerBadge?: boolean; botOrNotResult?: BotOrNotResult; sassyHash?: SassyHash; date: number; @@ -55,7 +54,6 @@ export const Cast: React.FC = ({ fid, fname, embeds, - hasPowerBadge, botOrNotResult, sassyHash, avatar, @@ -80,7 +78,6 @@ export const Cast: React.FC = ({ const showAltClientLinks = zenModeState.showAltClientLinks; const showImageOnly = zenModeState.showImageOnly; const showPFPs = zenModeState.showPFPs; - const showPowerBadges = zenModeState.showPowerBadges; const showDisplayNames = zenModeState.showDisplayNames; const showUserNames = zenModeState.showUserNames; const showBotOrNotIndicator = zenModeState.showBotOrNotIndicator; @@ -106,7 +103,6 @@ export const Cast: React.FC = ({ {showDisplayNames ? displayName ?? fname : null} - {showPowerBadges && hasPowerBadge ? ' ⚡ ' : ' '} {showUserNames ? ( {`@${fname}`} ) : ( diff --git a/src/components/apps/channelFeed/ChannelFeed.tsx b/src/components/apps/channelFeed/ChannelFeed.tsx index 7983ba5..67fdd95 100644 --- a/src/components/apps/channelFeed/ChannelFeed.tsx +++ b/src/components/apps/channelFeed/ChannelFeed.tsx @@ -6,7 +6,7 @@ import { AdvertFeed } from '@app/components/apps/channelFeed/AdvertFeed/AdvertFe import { BaseEmpty } from '@app/components/common/BaseEmpty/BaseEmpty'; import { BaseFeed } from '@app/components/common/BaseFeed/BaseFeed'; import { useAppSelector } from '@app/hooks/reduxHooks'; -import { allPowerBadgeUsersQuery, channelByIdQuery, followingByFidQuery } from '@app/queries/queries'; +import { channelByIdQuery, followingByFidQuery } from '@app/queries/queries'; import { useZustand } from '@app/store/zustand'; import { useNeynarContext } from '@neynar/react'; import { useQuery } from '@tanstack/react-query'; @@ -21,7 +21,6 @@ const isAllowedInMainFeed = (cast: CastObject, channelModerators: number[]) => { }; export const ChannelFeed: React.FC = () => { - const [allPowerBadgeUsers, setAllPowerBadgeUsers] = useState([]); const [channelModerators, setChannelModerators] = useState([]); const [casts, setCasts] = useState([]); const [nextPageToken, setNextPageToken] = useState(); @@ -47,12 +46,6 @@ export const ChannelFeed: React.FC = () => { const { user } = useNeynarContext(); const fid = getFidWithFallback(user); - const pbQuery = useQuery(allPowerBadgeUsersQuery()); - const memodPbData = useMemo(() => { - if (pbQuery.isLoading || pbQuery.error) return null; - return pbQuery.data; - }, [pbQuery.isLoading, pbQuery.error, pbQuery.data]); - const chQuery = useQuery(channelByIdQuery(activeChannelId)); const memodChData = useMemo(() => { if (chQuery.isLoading || chQuery.error) return null; @@ -66,18 +59,12 @@ export const ChannelFeed: React.FC = () => { return (ffQuery.data?.result?.users ?? [])?.map((u) => Number(u.fid)); }, [ffQuery.isLoading, ffQuery.error, ffQuery.data]); - useEffect(() => { - const allPowerBadgeUsers = memodPbData?.result.fids ?? []; - setAllPowerBadgeUsers(allPowerBadgeUsers); - }, [memodPbData]); - useEffect(() => { setChannelModerators(unique(sift([activeChannel?.leadFid, activeChannel?.moderatorFid]))); getEnhancedChannelFeed({ fid: fid, channel: activeChannel, following: memodFfData ?? [], - powerBadgeUsers: allPowerBadgeUsers, }) .then((res) => { setCasts(res.casts); @@ -87,7 +74,7 @@ export const ChannelFeed: React.FC = () => { .finally(() => { setLoaded(true); }); - }, [fid, memodChData, allPowerBadgeUsers, memodFfData, activeChannel]); + }, [fid, memodChData, memodFfData, activeChannel]); useEffect(() => { setNumCasts(casts.length); @@ -112,7 +99,6 @@ export const ChannelFeed: React.FC = () => { channel: activeChannel, pageToken: nextPageToken, following: memodFfData ?? [], - powerBadgeUsers: allPowerBadgeUsers, }).then((newCasts) => { setNextPageToken(newCasts.next?.cursor); setCasts(casts.concat(newCasts.casts)); @@ -148,7 +134,6 @@ export const ChannelFeed: React.FC = () => { recastooors={post.reactions?.recasts.map((r) => r.fid) ?? []} likes={post.reactions?.likes_count ?? 0} likooors={post.reactions?.likes.map((l) => l.fid) ?? []} - hasPowerBadge={post.authorHasPowerBadge} botOrNotResult={post.botOrNotResult} sassyHash={post.sassyHash} tags={[]} diff --git a/src/components/apps/followingFeed/FollowingFeed.tsx b/src/components/apps/followingFeed/FollowingFeed.tsx index 3c55031..2b6d76f 100644 --- a/src/components/apps/followingFeed/FollowingFeed.tsx +++ b/src/components/apps/followingFeed/FollowingFeed.tsx @@ -5,7 +5,7 @@ import { AdvertFeed } from '@app/components/apps/channelFeed/AdvertFeed/AdvertFe import { BaseEmpty } from '@app/components/common/BaseEmpty/BaseEmpty'; import { BaseFeed } from '@app/components/common/BaseFeed/BaseFeed'; import { useAppSelector } from '@app/hooks/reduxHooks'; -import { allChannelsQuery, allPowerBadgeUsersQuery, followingByFidQuery } from '@app/queries/queries'; +import { allChannelsQuery, followingByFidQuery } from '@app/queries/queries'; import { useZustand } from '@app/store/zustand'; import { useQuery } from '@tanstack/react-query'; import { useEffect, useMemo, useState } from 'react'; @@ -14,7 +14,6 @@ interface FollowingFeedProps { fid: number; } export const FollowingFeed: React.FC = ({ fid }) => { - const [allPowerBadgeUsers, setAllPowerBadgeUsers] = useState([]); const [casts, setCasts] = useState([]); const [nextPageToken, setNextPageToken] = useState(); const [hasMore, setHasMore] = useState(true); @@ -45,23 +44,11 @@ export const FollowingFeed: React.FC = ({ fid }) => { return (ffQuery.data?.result?.users ?? []).map((u) => Number(u.fid)); }, [ffQuery.isLoading, ffQuery.error, ffQuery.data]); - const pbQuery = useQuery(allPowerBadgeUsersQuery()); - const memodPbData = useMemo(() => { - if (pbQuery.isLoading || pbQuery.error) return null; - return pbQuery.data; - }, [pbQuery.isLoading, pbQuery.error, pbQuery.data]); - - useEffect(() => { - const allPowerBadgeUsers = memodPbData?.result.fids ?? []; - setAllPowerBadgeUsers(allPowerBadgeUsers); - }, [memodPbData]); - useEffect(() => { setCasts([]); getEnhancedFollowingFeed({ fid: fid, - powerBadgeUsers: allPowerBadgeUsers, allChannels: memodChannelData ?? [], }) .then((res) => { @@ -72,7 +59,7 @@ export const FollowingFeed: React.FC = ({ fid }) => { .finally(() => { setLoaded(true); }); - }, [fid, allPowerBadgeUsers, memodChannelData, memodFfData]); + }, [fid, memodChannelData, memodFfData]); useEffect(() => { setNumCasts(casts.length); @@ -85,7 +72,6 @@ export const FollowingFeed: React.FC = ({ fid }) => { getEnhancedFollowingFeed({ fid: fid, pageToken: nextPageToken, - powerBadgeUsers: allPowerBadgeUsers, allChannels: memodChannelData ?? [], }).then((newCasts) => { setNextPageToken(newCasts.next?.cursor); @@ -122,7 +108,6 @@ export const FollowingFeed: React.FC = ({ fid }) => { likes={post.reactions?.likes_count ?? 0} likooors={post.reactions?.likes.map((l) => l.fid) ?? []} tags={post.tags} - hasPowerBadge={post.authorHasPowerBadge} botOrNotResult={post.botOrNotResult} sassyHash={post.sassyHash} /> diff --git a/src/components/apps/forYouFeed/ForYouFeed.tsx b/src/components/apps/forYouFeed/ForYouFeed.tsx index 65ffab5..3e21b3d 100644 --- a/src/components/apps/forYouFeed/ForYouFeed.tsx +++ b/src/components/apps/forYouFeed/ForYouFeed.tsx @@ -5,7 +5,7 @@ import { AdvertFeed } from '@app/components/apps/channelFeed/AdvertFeed/AdvertFe import { BaseEmpty } from '@app/components/common/BaseEmpty/BaseEmpty'; import { BaseFeed } from '@app/components/common/BaseFeed/BaseFeed'; import { useAppSelector } from '@app/hooks/reduxHooks'; -import { allChannelsQuery, allPowerBadgeUsersQuery, followingByFidQuery } from '@app/queries/queries'; +import { allChannelsQuery, followingByFidQuery } from '@app/queries/queries'; import { useZustand } from '@app/store/zustand'; import { useQuery } from '@tanstack/react-query'; import { useEffect, useMemo, useState } from 'react'; @@ -14,7 +14,6 @@ interface ForYouFeedProps { fid: number; } export const ForYouFeed: React.FC = ({ fid }) => { - const [allPowerBadgeUsers, setAllPowerBadgeUsers] = useState([]); const [casts, setCasts] = useState([]); const [nextCursor, setNextCursor] = useState(); const [hasMore, setHasMore] = useState(true); @@ -47,24 +46,12 @@ export const ForYouFeed: React.FC = ({ fid }) => { return (ffQuery.data?.result?.users ?? []).map((u) => Number(u.fid)); }, [ffQuery.isLoading, ffQuery.error, ffQuery.data]); - const pbQuery = useQuery(allPowerBadgeUsersQuery()); - const memodPbData = useMemo(() => { - if (pbQuery.isLoading || pbQuery.error) return null; - return pbQuery.data; - }, [pbQuery.isLoading, pbQuery.error, pbQuery.data]); - - useEffect(() => { - const allPowerBadgeUsers = memodPbData?.result.fids ?? []; - setAllPowerBadgeUsers(allPowerBadgeUsers); - }, [memodPbData]); - useEffect(() => { setCasts([]); getEnhancedForYouFeed({ fid: fid, following: memodFfData ?? [], - powerBadgeUsers: allPowerBadgeUsers, allChannels: memodChannelData ?? [], }) .then((res) => { @@ -75,7 +62,7 @@ export const ForYouFeed: React.FC = ({ fid }) => { .finally(() => { setLoaded(true); }); - }, [fid, allPowerBadgeUsers, memodChannelData, memodFfData]); + }, [fid, memodChannelData, memodFfData]); useEffect(() => { setNumCasts(casts.length); @@ -90,7 +77,6 @@ export const ForYouFeed: React.FC = ({ fid }) => { fid: fid, cursor: nextCursor, following: memodFfData ?? [], - powerBadgeUsers: allPowerBadgeUsers, allChannels: memodChannelData ?? [], }).then((newCasts) => { setNextCursor(newCasts.next?.cursor); @@ -128,7 +114,6 @@ export const ForYouFeed: React.FC = ({ fid }) => { likes={post.reactions?.likes_count ?? 0} likooors={post.reactions?.likes.map((l) => l.fid) ?? []} tags={post.tags} - hasPowerBadge={post.authorHasPowerBadge} botOrNotResult={post.botOrNotResult} sassyHash={post.sassyHash} /> diff --git a/src/components/header/components/zenModeDropdown/zenModeOverlay/DisplaySettings.tsx b/src/components/header/components/zenModeDropdown/zenModeOverlay/DisplaySettings.tsx index 8c358e8..b88ef76 100644 --- a/src/components/header/components/zenModeDropdown/zenModeOverlay/DisplaySettings.tsx +++ b/src/components/header/components/zenModeDropdown/zenModeOverlay/DisplaySettings.tsx @@ -6,14 +6,12 @@ import { setHideDisplayNames, setHideEmbeds, setHidePFPs, - setHidePowerBadges, setHideReactions, setHideUserNames, setShowBotOrNotIndicator, setShowDisplayNames, setShowEmbeds, setShowPFPs, - setShowPowerBadges, setShowReactions, setShowUserNames, } from '@app/store/slices/zenModeSlice'; @@ -28,7 +26,6 @@ export const DisplaySettings: React.FC = () => { const showEmbeds = zenModeState.showEmbeds; const showReactions = zenModeState.showReactions; const showPFPs = zenModeState.showPFPs; - const showPowerBadges = zenModeState.showPowerBadges; const showDisplayNames = zenModeState.showDisplayNames; const showUserNames = zenModeState.showUserNames; const showBotOrNotIndicator = zenModeState.showBotOrNotIndicator; @@ -42,9 +39,6 @@ export const DisplaySettings: React.FC = () => { const handleChangePFPs = (showPFPs: boolean) => { dispatch(showPFPs ? setShowPFPs() : setHidePFPs()); }; - const handleChangePowerBadges = (showPowerBadges: boolean) => { - dispatch(showPowerBadges ? setShowPowerBadges() : setHidePowerBadges()); - }; const handleChangeDisplayNames = (showDisplayNames: boolean) => { dispatch(showDisplayNames ? setShowDisplayNames() : setHideDisplayNames()); }; @@ -87,16 +81,6 @@ export const DisplaySettings: React.FC = () => { /> - - {t('Power Badge')}{' '} - - - {t('Display Name')}{' '} { const fid = getFidWithFallback(user); const client = useQueryClient(); - client.prefetchQuery(allPowerBadgeUsersQuery()); client.prefetchQuery(channelByIdQuery()); client.prefetchQuery(allChannelsQuery()); client.prefetchQuery(userFollowingChannelsQuery(fid)); diff --git a/src/queries/queries.tsx b/src/queries/queries.tsx index b20210b..f511a76 100644 --- a/src/queries/queries.tsx +++ b/src/queries/queries.tsx @@ -6,7 +6,6 @@ import { getFollowingByFid } from '@app/api/followingByFid.api'; import { getHubReactionsByFid } from '@app/api/hubReactionsByFid.api'; import { HubReactionType } from '@app/api/hubble-http-types'; import { getMetadata } from '@app/api/metadata.api'; -import { getAllPowerBadgeUsers } from '@app/api/powerbadge.api'; import { getReactionsByHash } from '@app/api/reactionsByHash.api'; import { getUserFollowingChannels } from '@app/api/userFollowingChannels.api'; import { defaultChannelId } from '@app/constants/config/config'; @@ -14,14 +13,6 @@ import { queryOptions } from '@tanstack/react-query'; const defaultFid = import.meta.env.REACT_APP_DEFAULT_FID as number; -export const allPowerBadgeUsersQuery = () => - queryOptions({ - meta: { persist: true }, - queryKey: ['allPowerBadgeUsers'], - queryFn: () => getAllPowerBadgeUsers({ empty: undefined }), - staleTime: 2 * 60 * 60 * 1000, // 2 hours - }); - export const allChannelsQuery = () => queryOptions({ meta: { persist: true }, diff --git a/src/store/slices/zenModeSlice.ts b/src/store/slices/zenModeSlice.ts index ffbac65..a55c2f7 100644 --- a/src/store/slices/zenModeSlice.ts +++ b/src/store/slices/zenModeSlice.ts @@ -6,7 +6,6 @@ interface ZenModeState { showAltClientLinks: boolean; showImageOnly: boolean; showPFPs: boolean; - showPowerBadges: boolean; showDisplayNames: boolean; showUserNames: boolean; showBotOrNotIndicator: boolean; @@ -19,7 +18,6 @@ const showAltClientLinks = localStorage.getItem('showAltClientLinks') : true; const showImageOnly = localStorage.getItem('showImageOnly') === 'true'; const showPFPs = localStorage.getItem('showPFPs') === 'true'; -const showPowerBadges = localStorage.getItem('showPowerBadges') === 'true'; const showDisplayNames = localStorage.getItem('showDisplayNames') === 'true'; const showUserNames = localStorage.getItem('showUserNames') ? localStorage.getItem('showUserNames') === 'true' : true; const showBotOrNotIndicator = localStorage.getItem('showBotOrNotIndicator') @@ -31,7 +29,6 @@ localStorage.setItem('showReactions', JSON.stringify(showReactions)); localStorage.setItem('showAltClientLinks', JSON.stringify(showAltClientLinks)); localStorage.setItem('showImageOnly', JSON.stringify(showImageOnly)); localStorage.setItem('showPFPs', JSON.stringify(showPFPs)); -localStorage.setItem('showPowerBadges', JSON.stringify(showPowerBadges)); localStorage.setItem('showDisplayNames', JSON.stringify(showDisplayNames)); localStorage.setItem('showUserNames', JSON.stringify(showUserNames)); localStorage.setItem('showBotOrNotIndicator', JSON.stringify(showBotOrNotIndicator)); @@ -42,7 +39,6 @@ const initialState: ZenModeState = { showAltClientLinks, showImageOnly, showPFPs, - showPowerBadges, showDisplayNames, showUserNames, showBotOrNotIndicator, @@ -93,15 +89,6 @@ export const setShowPFPs = createAction('zenMode/showPFPs', () => { return { payload: true }; }); -export const setHidePowerBadges = createAction('zenMode/hidePowerBadges', () => { - localStorage.setItem('showPowerBadges', JSON.stringify(false)); - return { payload: false }; -}); -export const setShowPowerBadges = createAction('zenMode/showPowerBadges', () => { - localStorage.setItem('showPowerBadges', JSON.stringify(true)); - return { payload: true }; -}); - export const setHideDisplayNames = createAction('zenMode/hideDisplayNames', () => { localStorage.setItem('showDisplayNames', JSON.stringify(false)); return { payload: false }; @@ -164,12 +151,6 @@ export const zenModeSlice = createSlice({ builder.addCase(setHidePFPs, (state, action) => { state.showPFPs = action.payload; }); - builder.addCase(setShowPowerBadges, (state, action) => { - state.showPowerBadges = action.payload; - }); - builder.addCase(setHidePowerBadges, (state, action) => { - state.showPowerBadges = action.payload; - }); builder.addCase(setShowDisplayNames, (state, action) => { state.showDisplayNames = action.payload; });