diff --git a/packages/app/src/app/overmind/actions.ts b/packages/app/src/app/overmind/actions.ts
index 677c8f7283a..75cfc9782cd 100755
--- a/packages/app/src/app/overmind/actions.ts
+++ b/packages/app/src/app/overmind/actions.ts
@@ -2,9 +2,10 @@ import {
NotificationType,
convertTypeToStatus,
} from '@codesandbox/common/lib/utils/notifications';
-import { Action, AsyncAction } from '.';
-import * as internalActions from './internalActions';
+
import { withLoadApp } from './factories';
+import * as internalActions from './internalActions';
+import { Action, AsyncAction } from '.';
export const internal = internalActions;
@@ -16,6 +17,8 @@ export const sandboxPageMounted: AsyncAction = withLoadApp();
export const searchMounted: AsyncAction = withLoadApp();
+export const codesadboxMounted: AsyncAction = withLoadApp();
+
export const cliMounted: AsyncAction = withLoadApp(
async ({ state, actions }) => {
if (state.user) {
diff --git a/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/CodeSadbox.tsx b/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/CodeSadbox.tsx
index ac20f8c2d87..1698543f289 100644
--- a/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/CodeSadbox.tsx
+++ b/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/CodeSadbox.tsx
@@ -1,71 +1,82 @@
-import React from 'react';
-import GoHome from 'react-icons/lib/go/home';
-import GoIssueOpened from 'react-icons/lib/go/issue-opened';
-import { inject, hooksObserver } from 'app/componentConnectors';
import { Button } from '@codesandbox/common/lib/components/Button';
import { dashboardUrl } from '@codesandbox/common/lib/utils/url-generator';
+import { useOvermind } from 'app/overmind';
import { Navigation } from 'app/pages/common/Navigation';
+import React, { useEffect } from 'react';
+import GoHome from 'react-icons/lib/go/home';
+import GoIssueOpened from 'react-icons/lib/go/issue-opened';
// @ts-ignore
import Dashboard from '-!svg-react-loader!@codesandbox/common/lib/icons/dashboard.svg';
-import { Sadbox } from './Sadbox';
+
import { IFallbackComponentProps } from '../types';
import { buildCrashReport } from './buildCrashReport';
import {
+ Actions,
+ ButtonIcon,
Container,
+ Content,
Header,
Nav,
- Content,
- Title,
Subtitle,
- Actions,
- ButtonIcon,
+ Title,
} from './elements';
+import { Sadbox } from './Sadbox';
-export const CodeSadbox = inject('store')(
- hooksObserver(
- ({ error, trace, store }: IFallbackComponentProps & { store: any }) => (
-
-
-
- Oh no! Something broke!
-
- CodeSadbox
-
- {store.isLoggedIn ? (
-
-
-
-
- Go to Dashboard
-
- ) : (
-
-
-
-
- Back to Home
-
- )}
- {/*
- // @ts-ignore */}
-
+export const CodeSadbox: React.FC = ({
+ error,
+ trace,
+}) => {
+ const {
+ actions: { codesadboxMounted },
+ state: { isLoggedIn },
+ } = useOvermind();
+
+ useEffect(() => {
+ codesadboxMounted();
+ }, [codesadboxMounted]);
+
+ return (
+
+
+
+ Oh no! Something broke!
+
+ CodeSadbox
+
+ {isLoggedIn ? (
+
+
+
+
+ Go to Dashboard
+
+ ) : (
+
-
+
- Report Crash
+ Back to Home
-
-
-
- )
- )
-);
+ )}
+ {/*
+ // @ts-ignore */}
+
+
+
+
+ Report Crash
+
+
+
+
+ );
+};
diff --git a/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/buildCrashReport.ts b/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/buildCrashReport.ts
index f405244c216..474b50dddd2 100644
--- a/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/buildCrashReport.ts
+++ b/packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/buildCrashReport.ts
@@ -9,45 +9,49 @@ export const buildCrashReport = ({
error,
trace,
}: IbuildCrashReport): string => {
+ const url = new URL(
+ `https://github.com/codesandbox/codesandbox-client/issues/new`
+ );
const { name, version, os } = browser();
- const title = `💥 Crash Report: `;
+ url.searchParams.set(
+ `body`,
+ `💥 Crash Report
- const body = `💥 Crash Report
+ What were you trying to accomplish when the crash occurred?
-What were you trying to accomplish when the crash occurred?
+ > Please use this issue template to describe what you were doing when you encountered this crash. While we are able to fill in some details automatically, it's not always enough to reproduce!
-> Please use this issue template to describe what you were doing when you encountered this crash. While we are able to fill in some details automatically, it's not always enough to reproduce!
+ Link to sandbox: [link]() (optional)
-Link to sandbox: [link]() (optional)
+ Crash Details
-Crash Details
+
+ Environment
-
-Environment
+ | Browser | Version | Operating System |
+ | ------- | --------- | ---------------- |
+ | ${name} | ${version} | ${os} |
-| Browser | Version | Operating System |
-| ------- | --------- | ---------------- |
-| ${name} | ${version} | ${os} |
+ **Route:**
+ ${window.location.href}
-**Route:**
-${window.location.href}
+
-
+
+ Error Message
-
-Error Message
+ ${'```'}bash
+ ${error}
+ ${error.stack}
+ ${trace}
+ ${'```'}
-${'```'}bash
-${error}
-${error.stack}
-${trace}
-${'```'}
+
+ `
+ );
-
-`;
+ url.searchParams.set(`labels`, `💥 Crash Report`);
- return `https://github.com/codesandbox/codesandbox-client/issues/new?title=${encodeURI(
- title
- )}&body=${encodeURI(body)}`;
+ return url.toString();
};