File tree Expand file tree Collapse file tree
src/app/auth/telegram-oauth-finish Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function base64DecodeUnicode(str: string) {
2828export default function TelegramAuthFinishPage ( ) {
2929 const router = useRouter ( )
3030
31- const { data : fingerprint } = useFingerprint ( )
31+ const { data : fingerprint , error } = useFingerprint ( )
3232
3333 const { mutate } = useTelegramAuth ( {
3434 onSuccess ( data ) {
@@ -53,12 +53,13 @@ export default function TelegramAuthFinishPage() {
5353 if ( typeof user !== 'object' || user === null )
5454 throw new Error ( 'Decoded value is not an object' )
5555
56- if ( fingerprint )
57- mutate ( {
58- ...user ,
56+ mutate ( {
57+ ... user ,
58+ ...( fingerprint && {
5959 visitorId : fingerprint . visitorId ,
6060 requestId : fingerprint . requestId
6161 } )
62+ } )
6263 } catch ( err ) {
6364 console . error (
6465 'Ошибка парсинга JSON после декодирования:' ,
You can’t perform that action at this time.
0 commit comments