Skip to content

Commit

Permalink
fix: disable plugin page in starpi preview button
Browse files Browse the repository at this point in the history
  • Loading branch information
AliKdhim87 committed Nov 24, 2022
1 parent c8522ba commit 3d3d433
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions packages/preview-button/admin/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ import PluginIcon from "./components/PluginIcon";
const name = pluginPkg.strapi.name;
export default {
register(app) {
app.addMenuLink({
to: `/plugins/${pluginId}`,
icon: PluginIcon,
intlLabel: {
id: `${pluginId}.plugin.name`,
defaultMessage: name,
},
Component: async () => {
const component = await import(/* webpackChunkName: "[request]" */ "./pages/App");
return component;
},
// app.addMenuLink({
// to: `/plugins/${pluginId}`,
// icon: PluginIcon,
// intlLabel: {
// id: `${pluginId}.plugin.name`,
// defaultMessage: name,
// },
// Component: async () => {
// const component = await import(/* webpackChunkName: "[request]" */ "./pages/App");
// return component;
// },

permissions: [
// Uncomment to set the permissions of the plugin here
// {
// action: '', // the action name should be plugin::plugin-name.actionType
// subject: null,
// },
],
});
// permissions: [
// // Uncomment to set the permissions of the plugin here
// // {
// // action: '', // the action name should be plugin::plugin-name.actionType
// // subject: null,
// // },
// ],
// });

app.registerPlugin({
id: pluginId,
Expand Down
4 changes: 2 additions & 2 deletions packages/preview-button/admin/src/pages/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const App = () => {
return (
<div>
<Switch>
<Route path={`/plugins/${pluginId}`} component={HomePage} exact />
<Route component={NotFound} />
{/* <Route path={`/plugins/${pluginId}`} component={HomePage} exact />
<Route component={NotFound} /> */}
</Switch>
</div>
);
Expand Down

0 comments on commit 3d3d433

Please sign in to comment.