Skip to content

Commit

Permalink
fix: config validation allow admin dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRibbens committed Mar 11, 2021
1 parent f060d2d commit 2d1d1b4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions demo/customComponents/views/Account/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';

const CustomAccountView: React.FC = () => <div>fake account view</div>;

export default CustomAccountView;
5 changes: 5 additions & 0 deletions demo/customComponents/views/Dashboard/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';

const CustomDashboardView: React.FC = () => <div>fake dashboard view</div>;

export default CustomDashboardView;
4 changes: 4 additions & 0 deletions demo/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default buildConfig({
// Nav: () => (
// <div>Hello</div>
// ),
views: {
// Dashboard: CustomDashboardView,
// Account: CustomAccountView,
},
},
webpack: (config) => config,
},
Expand Down
5 changes: 4 additions & 1 deletion src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export default joi.object({
components: joi.object()
.keys({
Nav: component,
Dashboard: component,
views: joi.object({
Dashboard: component,
Account: component,
}),
graphics: joi.object({
Icon: component,
Logo: component,
Expand Down

0 comments on commit 2d1d1b4

Please sign in to comment.