17.05.2026 funny
This commit is contained in:
1
dist/assets/index-BbQ5Ok1h.css
vendored
Normal file
1
dist/assets/index-BbQ5Ok1h.css
vendored
Normal file
File diff suppressed because one or more lines are too long
60
dist/assets/index-CHC6dclK.js
vendored
60
dist/assets/index-CHC6dclK.js
vendored
File diff suppressed because one or more lines are too long
60
dist/assets/index-CbGm-SmX.js
vendored
Normal file
60
dist/assets/index-CbGm-SmX.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-DdoCSUef.css
vendored
1
dist/assets/index-DdoCSUef.css
vendored
File diff suppressed because one or more lines are too long
4
dist/index.html
vendored
4
dist/index.html
vendored
@@ -5,8 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ЭКСА — Ваш мост в мир цифровых активов</title>
|
||||
<script type="module" crossorigin src="/assets/index-CHC6dclK.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DdoCSUef.css">
|
||||
<script type="module" crossorigin src="/assets/index-CbGm-SmX.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BbQ5Ok1h.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -34,8 +34,8 @@ export function RouterProvider() {
|
||||
<Route path={ROUTES.BRIDGE} element={<BridgePage />} />
|
||||
<Route path={ROUTES.PROFILE} element={<ProfilePage />} />
|
||||
<Route path={ROUTES.SEED_PHRASE} element={<SeedPhrasePage />} />
|
||||
<Route path={ROUTES.KYC} element={<KycPage />} />
|
||||
</Route>
|
||||
<Route path={ROUTES.KYC} element={<KycPage />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
)
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import type { UseQueryOptions } from '@tanstack/react-query'
|
||||
import { getMe } from '../api/profileApi'
|
||||
import type { MeResponse } from '../api/profileApi'
|
||||
|
||||
export function useMe() {
|
||||
type MeOptions = Pick<UseQueryOptions<MeResponse>, 'refetchInterval' | 'enabled'>
|
||||
|
||||
export function useMe(options?: MeOptions) {
|
||||
return useQuery<MeResponse>({
|
||||
queryKey: ['me'],
|
||||
queryFn: getMe,
|
||||
staleTime: Infinity,
|
||||
gcTime: Infinity,
|
||||
retry: false,
|
||||
...options,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
import { Navigate } from 'react-router-dom'
|
||||
import { useMe } from '@features/auth'
|
||||
import { ROUTES } from '@shared/config/routes'
|
||||
import { KycWidget } from '@widgets/kyc-verification'
|
||||
import styles from './KycPage.module.css'
|
||||
|
||||
export function KycPage() {
|
||||
const { data, isLoading } = useMe()
|
||||
|
||||
if (isLoading) return null
|
||||
if (data?.kyc_verified) return <Navigate to={ROUTES.PROFILE} replace />
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<KycWidget />
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useQueryClient } from '@tanstack/react-query'
|
||||
import { PrimaryButton } from '@shared/ui'
|
||||
import { useMe } from '@features/auth'
|
||||
import { ROUTES } from '@shared/config/routes'
|
||||
import logo from '@shared/assets/logo-full-white.png'
|
||||
import { useKyc } from '../model/useKyc'
|
||||
import { KycModal } from './KycModal'
|
||||
@@ -6,6 +11,19 @@ import styles from './KycWidget.module.css'
|
||||
|
||||
export function KycWidget() {
|
||||
const { trigger, data, isLoading, isError } = useKyc()
|
||||
const navigate = useNavigate()
|
||||
const queryClient = useQueryClient()
|
||||
const { data: me } = useMe({ refetchInterval: data ? 5000 : false })
|
||||
|
||||
useEffect(() => {
|
||||
if (me?.kyc_verified) {
|
||||
navigate(ROUTES.SEED_PHRASE, { replace: true })
|
||||
}
|
||||
}, [me?.kyc_verified, navigate])
|
||||
|
||||
const handleClose = () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['me'] })
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -53,7 +71,7 @@ export function KycWidget() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{data && <KycModal data={data} onClose={() => window.location.reload()} />}
|
||||
{data && <KycModal data={data} onClose={handleClose} />}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ export function useRegisterForm() {
|
||||
|
||||
const completeMutation = useMutation({
|
||||
mutationFn: registrationComplete,
|
||||
onSuccess: ({ access_token }) => {
|
||||
onSuccess: async ({ access_token }) => {
|
||||
clearCsrfCache()
|
||||
tokenStore.set(access_token)
|
||||
queryClient.setQueryData(AUTH_QUERY_KEY, access_token)
|
||||
if (access_token) tokenStore.set(access_token)
|
||||
await queryClient.invalidateQueries({ queryKey: AUTH_QUERY_KEY })
|
||||
navigate(ROUTES.WALLET)
|
||||
},
|
||||
})
|
||||
|
||||
@@ -112,6 +112,30 @@
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.profileLinkRow {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.profileLink {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--interactive);
|
||||
text-decoration: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(74, 109, 255, 0.4);
|
||||
transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.profileLink:hover {
|
||||
background: rgba(74, 109, 255, 0.1);
|
||||
border-color: rgba(74, 109, 255, 0.7);
|
||||
box-shadow: 0 0 12px rgba(74, 109, 255, 0.2);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.seedGrid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Button } from '@shared/ui'
|
||||
import { ROUTES } from '@shared/config/routes'
|
||||
import { useSeedPhrase } from '../model/useSeedPhrase'
|
||||
import styles from './SeedPhraseWidget.module.css'
|
||||
|
||||
@@ -51,6 +53,12 @@ export function SeedPhraseWidget({ words }: Props) {
|
||||
Никогда не передавайте сид-фразу третьим лицам. Тот, кто знает фразу — владеет кошельком.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.profileLinkRow}>
|
||||
<Link to={ROUTES.PROFILE} className={styles.profileLink}>
|
||||
Перейти в профиль
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user