This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PosedTopBar = posed(TopBar)({ | |
open: { | |
opacity: 1, | |
transition: { | |
duration: 50 | |
} | |
}, | |
closed: { | |
delay: 200, | |
opacity: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PosedCover = posed(Cover)({ | |
open: { | |
rotateX: '0deg', | |
opacity: 1, | |
transition: { | |
type: 'spring', | |
mass: 0.5 | |
}, | |
delay: 150 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Perspective = styled.div` | |
perspective: 800px; | |
overflow: visible !important; | |
transform-style: preserve-3d; | |
width: 100%; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
padding: 8px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleSearch = async ({ value, client }) => { | |
this.setState({ | |
value | |
}); | |
if (value.length > 1) { | |
const { data } = await client.query({ | |
query: USERS_QUERY, | |
variables: { query: value, boardId: this.props.boardId } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
const { dataSource, value } = this.state; | |
return ( | |
<ApolloConsumer> | |
{client => ( | |
<div> | |
<AutoComplete | |
onSelect={this.onSelect} | |
onSearch={value => { | |
this.handleSearch({ value, client }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<Mutation | |
mutation={CREATE_MATCH_MUTATION} | |
update={createUpdate} | |
refetchQueries={['scores']} | |
> | |
{(createMatchMutation, { loading, error }) => ( | |
<Button | |
type="primary" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onUpdate = (cache, { data: { createBoard } }) => { | |
const { myBoards } = cache.readQuery({ query: MYBOARDS_QUERY }); | |
cache.writeQuery({ | |
query: MYBOARDS_QUERY, | |
data: { myBoards: myBoards.concat([createBoard]) } | |
}); | |
this.handleCancel(); | |
}; | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onUpdate = (cache, { data: { createBoard } }) => { | |
const { myBoards } = cache.readQuery({ query: MYBOARDS_QUERY }); | |
cache.writeQuery({ | |
query: MYBOARDS_QUERY, | |
data: { myBoards: myBoards.concat([createBoard]) } | |
}); | |
this.handleCancel(); | |
}; | |
... |
NewerOlder