How to use the @webiny/app-admin/components.withCrud function in @webiny/app-admin

To help you get started, we’ve selected a few @webiny/app-admin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / app-page-builder / src / admin / views / Menus / Menus.js View on Github external
);
}

export default compose(
    withCrud({
        list: {
            get: {
                query: loadMenus,
                variables: { sort: { savedOn: -1 } },
                response: data => get(data, "pageBuilder.menus")
            },
            delete: {
                mutation: deleteMenu,
                response: data => data.pageBuilder.deleteMenu,
                snackbar: data => t`Menu {name} deleted.`({ name: data.name })
            }
        },
        form: {
            get: {
                query: loadMenu,
                response: data => get(data, "pageBuilder.menu")
github webiny / webiny-js / packages / app-security / src / admin / views / Users.js View on Github external
return (
        
            
                
            
            
                
            

            
        
    );
};

export default compose(
    withCrud({
        list: {
            get: {
                query: loadUsers,
                variables: { sort: { savedOn: -1 } },
                response: data => get(data, "security.users")
            },
            delete: {
                mutation: deleteUser,
                response: data => data.security.deleteUser,
                snackbar: data => t`User {name} deleted.`({ name: data.fullName })
            }
        },
        form: {
            get: {
                query: loadUser,
                response: data => get(data, "security.user")

@webiny/app-admin

A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.

MIT
Latest version published 2 days ago

Package Health Score

78 / 100
Full package analysis

Similar packages