Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import { inject, hooksObserver } from 'app/componentConnectors';
import React from 'react';
import { useOvermind } from 'app/overmind';
import React, { FunctionComponent } from 'react';
import LinkIcon from 'react-icons/lib/fa/external-link';
import Cogs from 'react-icons/lib/fa/cogs';

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

export const VisitSiteButton = inject('store')(
hooksObserver(({ store: { deployment: { building, netlifySite } } }) => (
<Link disabled={building} href={netlifySite.url}>
export const VisitSiteButton: FunctionComponent = () => {
const {
state: {
deployment: {
building,
netlifySite: { url },
},
},
} = useOvermind();

return (
<Link disabled={building} href={url}>
{building ? (
<>
<Cogs /> Building...
Expand All @@ -18,5 +27,5 @@ export const VisitSiteButton = inject('store')(
</>
)}
</Link>
))
);
);
};