|
1 | | -import React from 'react'; |
2 | | -import { inject, hooksObserver } from 'app/componentConnectors'; |
| 1 | +import React, { FunctionComponent } from 'react'; |
| 2 | + |
3 | 3 | import { Integration } from 'app/components/Integration'; |
4 | 4 | import { ZeitLogo } from 'app/components/ZeitLogo'; |
| 5 | +import { useOvermind } from 'app/overmind'; |
5 | 6 |
|
6 | | -interface Props { |
| 7 | +type Props = { |
7 | 8 | small: boolean; |
8 | | - store: any; |
9 | | - signals: any; |
10 | | -} |
| 9 | +}; |
| 10 | +export const ZeitIntegration: FunctionComponent<Props> = ({ small }) => { |
| 11 | + const { |
| 12 | + actions: { signInZeitClicked, signOutZeitClicked }, |
| 13 | + state: { user, isLoadingZeit }, |
| 14 | + } = useOvermind(); |
11 | 15 |
|
12 | | -export const ZeitIntegration = inject('store', 'signals')( |
13 | | - hooksObserver( |
14 | | - ({ |
15 | | - small, |
16 | | - signals: { signInZeitClicked, signOutZeitClicked }, |
17 | | - store: { user, isLoadingZeit }, |
18 | | - }: Props) => ( |
19 | | - <Integration |
20 | | - name="ZEIT" |
21 | | - small={small} |
22 | | - bgColor="black" |
23 | | - description="Deployments" |
24 | | - Icon={ZeitLogo} |
25 | | - userInfo={user.integrations.zeit} |
26 | | - onSignIn={signInZeitClicked} |
27 | | - onSignOut={signOutZeitClicked} |
28 | | - loading={isLoadingZeit} |
29 | | - /> |
30 | | - ) |
31 | | - ) |
32 | | -); |
| 16 | + return ( |
| 17 | + <Integration |
| 18 | + name="ZEIT" |
| 19 | + small={small} |
| 20 | + bgColor="black" |
| 21 | + description="Deployments" |
| 22 | + Icon={ZeitLogo} |
| 23 | + userInfo={user.integrations.zeit} |
| 24 | + onSignIn={signInZeitClicked} |
| 25 | + onSignOut={signOutZeitClicked} |
| 26 | + loading={isLoadingZeit} |
| 27 | + /> |
| 28 | + ); |
| 29 | +}; |
0 commit comments