Add simple user model
This commit is contained in:
33
web/src/components/UsersCell/UsersCell.js
Normal file
33
web/src/components/UsersCell/UsersCell.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
|
||||
import Users from 'src/components/Users'
|
||||
|
||||
export const QUERY = gql`
|
||||
query USERS {
|
||||
users {
|
||||
id
|
||||
email
|
||||
createdAt
|
||||
updatedAt
|
||||
image
|
||||
bio
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const Loading = () => <div>Loading...</div>
|
||||
|
||||
export const Empty = () => {
|
||||
return (
|
||||
<div className="rw-text-center">
|
||||
{'No users yet. '}
|
||||
<Link to={routes.newUser()} className="rw-link">
|
||||
{'Create one?'}
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const Success = ({ users }) => {
|
||||
return <Users users={users} />
|
||||
}
|
||||
Reference in New Issue
Block a user