Skip to content

Commit

Permalink
update trans
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Oct 3, 2023
1 parent 68c4691 commit 3860b76
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
9 changes: 7 additions & 2 deletions src/pages/Oauth/AuthForm/ButtonEth.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LoginMethod } from '@kybernetwork/oauth2'
import { Trans } from '@lingui/macro'
import { useCallback } from 'react'
import { Flex, Text } from 'rebass'

Expand Down Expand Up @@ -63,12 +64,16 @@ const ButtonEth = ({
{loading ? (
<>
<Loader />
&nbsp; <Text style={{ whiteSpace: 'nowrap' }}> Signing In</Text>
&nbsp;{' '}
<Text sx={{ whiteSpace: 'nowrap' }}>
{' '}
<Trans>Signing In</Trans>
</Text>
</>
) : (
<>
<Wallet />
&nbsp; Sign-In with Wallet
&nbsp; <Trans>Sign-In with Wallet</Trans>
</>
)}
</ButtonPrimary>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Oauth/AuthForm/ButtonGoogle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LoginMethod } from '@kybernetwork/oauth2'
import { Trans } from '@lingui/macro'
import React, { useCallback, useRef } from 'react'

import { ButtonOutlined, ButtonPrimary } from 'components/Button'
Expand Down Expand Up @@ -28,7 +29,7 @@ const ButtonGoogle: React.FC<Props> = ({ outline, flowStatus }) => {
value: 'google',
name: 'provider',
ref,
children: <>Sign-In with Google</>,
children: <Trans>Sign-In with Google</Trans>,
style: isAutoLogin ? { opacity: 0 } : undefined,
}
return React.createElement(outline ? ButtonOutlined : ButtonPrimary, props)
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Oauth/AuthForm/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { LoginFlow, LoginMethod } from '@kybernetwork/oauth2'
import React from 'react'
import { isMobile } from 'react-device-detect'
import { Flex } from 'rebass'
import styled from 'styled-components'

import useParsedQueryString from 'hooks/useParsedQueryString'
Expand Down Expand Up @@ -55,9 +56,9 @@ const AuthForm: React.FC<AuthFormProps> = ({ formConfig, signInWithEth, flowStat
/>
)}
{hasBothEthAndGoogle && (
<div style={{ display: 'flex', width: '100%', alignItems: 'center', gap: 10, color: theme.subText }}>
<Flex style={{ width: '100%', alignItems: 'center', gap: 10, color: theme.subText }}>
<Splash /> or <Splash />
</div>
</Flex>
)}
{hasGoogle && <ButtonGoogle flowStatus={flowStatus} outline={showEth} />}
</Form>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Oauth/Consent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function Page() {
KyberOauth2.oauthUi
.getFlowConsent(consent_challenge)
.then(data => {
console.debug('resp consent', data)
console.debug('Oauth resp consent', data)
})
.catch(err => {
console.debug('err consent', err)
console.debug('Oauth consent error', err)
})
}, [consent_challenge])

Expand Down
4 changes: 2 additions & 2 deletions src/pages/Oauth/Logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function Logout() {
KyberOauth2.oauthUi
.acceptLogout(logout_challenge)
.then(data => {
console.debug('logout resp', data)
console.debug('Oauth logout resp', data)
})
.catch(err => {
console.debug('err logout', err)
console.debug('Oauth logout error', err)
})
}, [logout_challenge])

Expand Down

0 comments on commit 3860b76

Please sign in to comment.