mirror of
https://github.com/zhigang1992/apollo.git
synced 2026-05-13 09:26:34 +08:00
Fix code example – add StyledButton (#323)
... so that LogoutButton works fine
This commit is contained in:
committed by
Jake Dawkins
parent
0df70338e4
commit
fe616f3eaf
@@ -249,6 +249,12 @@ export default function LogoutButton() {
|
||||
</ApolloConsumer>
|
||||
);
|
||||
}
|
||||
|
||||
const StyledButton = styled("button")(menuItemClassName, {
|
||||
background: "none",
|
||||
border: "none",
|
||||
padding: 0
|
||||
});
|
||||
```
|
||||
|
||||
When we click the button, we perform a direct cache write by calling `client.writeData` and passing in a data object that sets the `isLoggedIn` boolean to false.
|
||||
|
||||
Reference in New Issue
Block a user