File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
packages/app/src/app/pages/common/SignInButton Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 1- import * as React from 'react' ;
2- import { inject , observer } from 'app/componentConnectors' ;
3-
4- import GithubIcon from 'react-icons/lib/go/mark-github' ;
51import { Button } from '@codesandbox/common/lib/components/Button' ;
62import Row from '@codesandbox/common/lib/components/flex/Row' ;
3+ import React , { ComponentProps , FunctionComponent } from 'react' ;
4+ import GithubIcon from 'react-icons/lib/go/mark-github' ;
75
8- const SignInButtonComponent = ( props : any ) => {
9- const { signInClicked } = props . signals ;
6+ import { useOvermind } from 'app/overmind' ;
7+
8+ type Props = Omit < ComponentProps < typeof Button > , 'onClick' | 'small' > ;
9+ export const SignInButton : FunctionComponent < Props > = props => {
10+ const {
11+ actions : { signInClicked } ,
12+ } = useOvermind ( ) ;
1013
1114 return (
12- < Button small onClick = { signInClicked } { ...props } >
15+ < Button
16+ { ...props }
17+ onClick = { ( ) => signInClicked ( { useExtraScopes : false } ) }
18+ small
19+ >
1320 < Row >
1421 < GithubIcon style = { { marginRight : '0.5rem' } } /> Sign in with GitHub
1522 </ Row >
1623 </ Button >
1724 ) ;
1825} ;
19-
20- export const SignInButton = inject ( 'signals' ) ( observer ( SignInButtonComponent ) ) ;
You can’t perform that action at this time.
0 commit comments