Skip to content

Commit

Permalink
fix(cms): fix border radius on cms components
Browse files Browse the repository at this point in the history
  • Loading branch information
Frantz Kati committed Dec 17, 2020
1 parent db26903 commit 9fe4aaa
Show file tree
Hide file tree
Showing 21 changed files with 103 additions and 285,220 deletions.
11 changes: 9 additions & 2 deletions packages/auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,10 @@ class Auth {
return resolve(parent, args, context, info)
}
)
if (query.config.resource) {
if (
query.config.resource &&
this.config.rolesAndPermissions
) {
const { path, internal } = query.config
const {
snakeCaseNamePlural: plural,
Expand Down Expand Up @@ -735,7 +738,11 @@ class Auth {
return next()
}
])
if (route.config.resource && !this.config.cms) {
if (
route.config.resource &&
!this.config.cms &&
this.config.rolesAndPermissions
) {
const { resource, id } = route.config

const { slugSingular, slugPlural } = resource.data
Expand Down
8 changes: 3 additions & 5 deletions packages/cms/pages/CreateResource/CreateResource.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, Fragment } from 'react'
import { Heading, Button, Paragraph. TextInput } from '@tensei/components'
import { Heading, Button, Paragraph, TextInput } from '@tensei/components'

interface CreateResourceProps {}

Expand Down Expand Up @@ -30,12 +30,10 @@ const CreateResource: React.FC<CreateResourceProps> = ({}) => {
</Paragraph>

<div className="w-full md:w-2/3 mt-10">
<TextInput label="Title" />
<TextInput label="Title" name="title" id="id" />
</div>
</div>
<div className="bg-white rounded-lg p-12 mt-10">
5
</div>
<div className="bg-white rounded-lg p-12 mt-10">5</div>
</div>
</Fragment>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/cms/pages/CreateResource/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './CreateResource'
export { default } from './CreateResource'
2 changes: 1 addition & 1 deletion packages/cms/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
<div className="py-6">
<div className="max-w-full mx-auto px-4 sm:px-6 md:px-8">
{/* Replace with your content */}
<CreateResource />
<Resource />
{/* /End replace */}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/cms/pages/ShowResource/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './ShowResource'
export { default } from './ShowResource'
Loading

0 comments on commit 9fe4aaa

Please sign in to comment.