Skip to content

Commit

Permalink
Update ReaderCard
Browse files Browse the repository at this point in the history
  • Loading branch information
DustyReagan committed Feb 11, 2025
1 parent 313fab2 commit 75d18a6
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions client/my-sites/customer-home/cards/features/reader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { useLocale } from '@automattic/i18n-utils';
import { useQuery } from '@tanstack/react-query';
import { useTranslate } from 'i18n-calypso';
import { useEffect } from 'react';
import iconReaderLightbulb from 'calypso/assets/images/customer-home/reader-lightbulb.svg';
import withDimensions from 'calypso/lib/with-dimensions';
import wpcom from 'calypso/lib/wp';
import { trackScrollPage } from 'calypso/reader/controller-helper';
import DiscoverNavigation from 'calypso/reader/discover/components/navigation/v1';
import { DEFAULT_TAB, buildDiscoverStreamKey } from 'calypso/reader/discover/helper';
Expand All @@ -20,24 +17,6 @@ interface ReaderCardProps {

const ReaderCard = ( props: ReaderCardProps ) => {
const translate = useTranslate();
const locale = useLocale();

const { data: interestTags = [] } = useQuery( {
queryKey: [ 'read/interests', locale ],
queryFn: () =>
wpcom.req.get(
{
path: `/read/interests`,
apiNamespace: 'wpcom/v2',
},
{
_locale: locale,
}
),
select: ( data ) => {
return data.interests;
},
} );

const queryParams = new URLSearchParams( window.location.search );
const selectedTab = queryParams.get( 'selectedTab' ) || DEFAULT_TAB;
Expand Down Expand Up @@ -65,11 +44,7 @@ const ReaderCard = ( props: ReaderCardProps ) => {
) }
</span>
</div>
<DiscoverNavigation
width={ props.width }
selectedTab={ selectedTab }
recommendedTags={ interestTags }
/>
<DiscoverNavigation width={ props.width } selectedTab={ selectedTab } />
<Stream
streamKey={ streamKey }
trackScrollPage={ trackScrollPage.bind( null ) }
Expand Down

0 comments on commit 75d18a6

Please sign in to comment.