Skip to content

Commit

Permalink
use features API for nav items
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed May 9, 2024
1 parent f911eb5 commit e70fe67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions inc/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public static function runtime() {
'version' => BLUEHOST_PLUGIN_VERSION,
'assets' => BLUEHOST_PLUGIN_URL . 'assets/',
'brand' => $bluehost_module_container->plugin()->brand,
),
'features' => getFeatures(), // just for now until we expose via js api endpoint
)
);

return $runtime;
Expand Down
4 changes: 2 additions & 2 deletions src/app/data/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const routes = [
title: __( 'Performance', 'wp-plugin-bluehost' ),
Component: Performance,
Icon: BoltIcon,
condition: window.NewfoldRuntime.features.performance,
condition: await window.NewfoldFeatures.isEnabled( 'performance' ),
},
{
name: '/settings',
Expand All @@ -147,7 +147,7 @@ export const routes = [
title: __( 'Staging', 'wp-plugin-bluehost' ),
Component: Staging,
Icon: WrenchScrewdriverIcon,
condition: window.NewfoldRuntime.features.staging,
condition: await window.NewfoldFeatures.isEnabled( 'staging' ),
},
{
name: '/help',
Expand Down

0 comments on commit e70fe67

Please sign in to comment.