From 4be691c46eabd35a5665c3df120436a036e50dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 3 Oct 2019 15:16:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Switch=20DashboardChangelog=20to?= =?UTF-8?q?=20use=20useOvermind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/{Helmet.js => Helmet.tsx} | 0 .../Modals/Changelog/Dashboard/index.tsx | 37 +++++++++++-------- .../common/src/components/Button/index.tsx | 18 ++++++--- 3 files changed, 34 insertions(+), 21 deletions(-) rename packages/app/src/app/pages/common/Modals/Changelog/Dashboard/{Helmet.js => Helmet.tsx} (100%) diff --git a/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/Helmet.js b/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/Helmet.tsx similarity index 100% rename from packages/app/src/app/pages/common/Modals/Changelog/Dashboard/Helmet.js rename to packages/app/src/app/pages/common/Modals/Changelog/Dashboard/Helmet.tsx diff --git a/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.tsx b/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.tsx index 6f4d42b405a..0a2345c5a5d 100644 --- a/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.tsx +++ b/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.tsx @@ -1,9 +1,10 @@ -import React, { FunctionComponent } from 'react'; import CSS from 'csstype'; -import { useOvermind } from 'app/overmind'; -import { Link } from 'react-router-dom'; import theme from '@codesandbox/common/lib/theme'; import { Button } from '@codesandbox/common/lib/components/Button'; +import React, { FunctionComponent } from 'react'; +import { Link } from 'react-router-dom'; + +import { useOvermind } from 'app/overmind'; // Inline styles because styled-components didn't load the styles const titleStyles: CSS.Properties = { @@ -53,32 +54,33 @@ export const DashboardChangelog: FunctionComponent = () => { return (

What {"'"}s New

+
July 2nd, 2018
CodeSandbox Announcement

@@ -90,6 +92,7 @@ export const DashboardChangelog: FunctionComponent = () => {

Dashboard

+

You can now manage your sandboxes in your own{' '} dashboard! You @@ -99,6 +102,7 @@ export const DashboardChangelog: FunctionComponent = () => {

Create Teams

+

An extension to the dashboard is teams! You can now create a team with unlimited members to share sandboxes for collaboration. All @@ -107,6 +111,7 @@ export const DashboardChangelog: FunctionComponent = () => {

Free CodeSandbox Live

+

Teams is not our only feature that allows for collaboration. We also have real time collaboration with{' '} @@ -124,6 +129,7 @@ export const DashboardChangelog: FunctionComponent = () => {

And More

+

There {"'"}s a lot more included in this update! Make sure to check out the @@ -132,23 +138,24 @@ export const DashboardChangelog: FunctionComponent = () => {

- {/* - // @ts-ignore */} + + {/* + // @ts-ignore */} diff --git a/packages/common/src/components/Button/index.tsx b/packages/common/src/components/Button/index.tsx index 732cb10487e..c0f776925cb 100644 --- a/packages/common/src/components/Button/index.tsx +++ b/packages/common/src/components/Button/index.tsx @@ -1,4 +1,5 @@ -import React from 'react'; +import React, { FunctionComponent } from 'react'; + import { LinkButton, AButton, Button } from './elements'; export type Props = { @@ -14,19 +15,24 @@ export type Props = { danger?: boolean; secondary?: boolean; red?: boolean; + target?: string; + rel?: string; }; -function ButtonComponent({ style = {}, ...props }: Props) { +const ButtonComponent: FunctionComponent = ({ + style = {}, + ...props +}) => { // Link if (props.to) { - return ; + return ; } if (props.href) { - return ; + return ; } - return