Skip to content

Commit 843aff9

Browse files
MichaelDeBoeySaraVieira
authored andcommitted
🔨 Switch ClaimSiteButton to use useOvermind (codesandbox#2546)
1 parent 306453f commit 843aff9

File tree

1 file changed

+13
-6
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Netlify/SiteInfo/Actions/ClaimSiteButton

1 file changed

+13
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
import { inject, hooksObserver } from 'app/componentConnectors';
2-
import React from 'react';
1+
import React, { FunctionComponent } from 'react';
2+
3+
import { useOvermind } from 'app/overmind';
34

45
import { Link } from '../../../../elements';
56

6-
export const ClaimSiteButton = inject('store')(
7-
hooksObserver(({ store: { deployment: { building, netlifyClaimUrl } } }) => (
7+
export const ClaimSiteButton: FunctionComponent = () => {
8+
const {
9+
state: {
10+
deployment: { building, netlifyClaimUrl },
11+
},
12+
} = useOvermind();
13+
14+
return (
815
<Link disabled={building} href={netlifyClaimUrl}>
916
Claim Site
1017
</Link>
11-
))
12-
);
18+
);
19+
};

0 commit comments

Comments
 (0)