Fix code example – add StyledButton (#323)

... so that LogoutButton works fine
This commit is contained in:
Borek Bernard
2019-04-16 23:36:37 +02:00
committed by Jake Dawkins
parent 0df70338e4
commit fe616f3eaf

View File

@@ -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.