Skip to content

Commit b28f347

Browse files
authored
Merge pull request #2892 from vivekbopaliya/fix/oauths
Saving unsaved Sketch before signing in with Oauth.
2 parents 25067be + 5269329 commit b28f347

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/modules/User/components/SocialAuthButton.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { remSize } from '../../../theme';
88
import { GithubIcon, GoogleIcon } from '../../../common/icons';
99
import Button from '../../../common/Button';
1010
import { unlinkService } from '../actions';
11+
import { persistState } from '../../IDE/actions/project';
1112

1213
const authUrls = {
1314
github: '/auth/github',
@@ -64,6 +65,7 @@ function SocialAuthButton({ service, linkStyle, isConnected }) {
6465
<StyledButton
6566
iconBefore={<ServiceIcon aria-label={ariaLabel} />}
6667
href={authUrls[service]}
68+
onClick={() => dispatch(persistState())}
6769
>
6870
{connectLabel}
6971
</StyledButton>
@@ -73,6 +75,7 @@ function SocialAuthButton({ service, linkStyle, isConnected }) {
7375
<StyledButton
7476
iconBefore={<ServiceIcon aria-label={ariaLabel} />}
7577
href={authUrls[service]}
78+
onClick={() => dispatch(persistState())}
7679
>
7780
{loginLabel}
7881
</StyledButton>

0 commit comments

Comments
 (0)