This is a companion discussion topic for the original entry at https://strapi.io/blog/how-to-create-a-strapi-v4-plugin-admin-customization-5-6
This is a companion discussion topic for the original entry at https://strapi.io/blog/how-to-create-a-strapi-v4-plugin-admin-customization-5-6
HI,
I think there is two bug in Settings page and setting data stored unexpected format in PluginStore. Due this bugs settings page and store not working.
In admin/src/pages/Settings/index.js
line 27 res.data.settings
is wrong I need to correct it to res.data
because there is no settings
key.
In admin/src/api/task.js
line 15 body
key isn’t valid due the code never use it. Correct code is
setSettings: async data => {
return await axiosInstance.post(`/todo/settings`, data);
},
There seems to be a part missing in this tutorial, where the todo/settings routes are actually created. I’m geting 404s in the admin panel because of this
To import design-system’s components, you need to change import path from this document’s code sample
// incorrect path
import { Box } from '@strapi/design-system/box';
//correct path
import { Box } from '@strapi/design-system';