auth not authenticated fixed
This commit is contained in:
parent
0c9b9224f6
commit
4156c57015
|
|
@ -42,7 +42,11 @@ const LotteryAuthForm = () => {
|
|||
try {
|
||||
const response = await Queries.authenticateLottery(phone, code);
|
||||
setAuth(response, phone, code);
|
||||
router.replace('/lottery');
|
||||
if (response.errorMessage?.length) {
|
||||
setError('Telefon belgisi ýa-da açar nädogry');
|
||||
} else {
|
||||
router.replace('/lottery');
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Authentication error:', err);
|
||||
setError('Telefon belgisi ýa-da açar nädogry');
|
||||
|
|
|
|||
|
|
@ -20,4 +20,5 @@ export interface ILotteryData {
|
|||
export interface ILotteryResponse {
|
||||
data: ILotteryData;
|
||||
user_lottery_numbers: string[];
|
||||
errorMessage?: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue