Style userProfile display and editable

This commit is contained in:
Kurt Hutten
2020-11-05 06:47:55 +11:00
parent 217cb31ed2
commit 249dbaba1a
17 changed files with 210 additions and 47 deletions

View File

@@ -0,0 +1,25 @@
import UserProfile from 'src/components/UserProfile'
export const QUERY = gql`
query FIND_USER_BY_ID($userName: String!) {
user: userName(userName: $userName) {
id
userName
email
createdAt
updatedAt
image
bio
}
}
`
export const Loading = () => <div>Loading...</div>
export const Empty = () => <div>Empty</div>
export const Failure = ({ error }) => <div>Error: {error.message}</div>
export const Success = ({ user }) => {
return <UserProfile user={user} isEditable />
}