Skip to content

Commit

Permalink
Overview: Fix quick actions warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Jan 20, 2025
1 parent 570d43b commit 759fd0e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions client/sites/overview/components/quick-actions-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,21 @@ const QuickActionsCard: FC = () => {
const hasEnTranslation = useHasEnTranslation();
const site = useSelector( getSelectedSite );
const { data: activeThemeData } = useActiveThemeQuery( site?.ID || -1, !! site );
const { editorUrl, themeInstallUrl, pluginInstallUrl, statsUrl, siteEditorUrl } = useSelector(
( state ) => ( {
editorUrl: site?.ID ? getEditorUrl( state, site.ID ) : '#',
themeInstallUrl: getThemeInstallUrl( state, site?.ID ) ?? '',
pluginInstallUrl: getPluginInstallUrl( state, site?.ID ) ?? '',
statsUrl: getStatsUrl( state, site?.ID ) ?? '',
siteEditorUrl:
site?.ID && activeThemeData
? getCustomizeUrl(
state as object,
activeThemeData[ 0 ]?.stylesheet,
site?.ID,
activeThemeData[ 0 ]?.is_block_theme
)
: '',
} )
const editorUrl = useSelector( ( state ) =>
site?.ID ? getEditorUrl( state, site?.ID ) : '#'
);
const themeInstallUrl = useSelector( ( state ) => getThemeInstallUrl( state, site?.ID ) ?? '' );
const pluginInstallUrl = useSelector( ( state ) => getPluginInstallUrl( state, site?.ID ) ?? '' );
const statsUrl = useSelector( ( state ) => getStatsUrl( state, site?.ID ) ?? '' );
const siteEditorUrl = useSelector( ( state ) =>
site?.ID && activeThemeData
? getCustomizeUrl(
state as object,
activeThemeData[ 0 ]?.stylesheet,
site?.ID,
activeThemeData[ 0 ]?.is_block_theme
)
: ''
);

const { adminLabel, adminUrl } = useSiteAdminInterfaceData( site?.ID );
Expand Down

0 comments on commit 759fd0e

Please sign in to comment.