translations added
This commit is contained in:
parent
a9b0ede046
commit
89f563278f
|
|
@ -39,7 +39,7 @@ const PrizesPage = ({ params }: { params: { user_id: string } }) => {
|
|||
if (isLoading)
|
||||
return (
|
||||
<div className="flex justify-center items-center h-full text-heading2 leading-heading2 font-medium min-h-[50vh]">
|
||||
Loading...
|
||||
Ýüklenilýär...
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,21 +47,21 @@ const PrizeCard = ({
|
|||
code,
|
||||
}),
|
||||
onSuccess: () => {
|
||||
setDialogTitle('Успешно');
|
||||
setDialogDescription('Приз успешно выбран.');
|
||||
setDialogTitle('Üstünlikli');
|
||||
setDialogDescription('Sowgat üstünlikli saýlanyldy.');
|
||||
setIsSuccess(true); // Mark as success so we can handle setting the prize when dialog closes
|
||||
},
|
||||
onError: () => {
|
||||
setDialogTitle('Ошибка');
|
||||
setDialogDescription('Произошла ошибка, попробуйте еще раз.');
|
||||
setDialogTitle('Ýalňyşlyk');
|
||||
setDialogDescription('Ýalňyşlyk ýüze çykdy, gaýtadan synanşyp görmegiňizi haýyş edýäris.');
|
||||
setIsSuccess(false); // Reset on error
|
||||
},
|
||||
});
|
||||
|
||||
const handleDialogOpen = () => {
|
||||
// Reset the dialog to show the loading state
|
||||
setDialogTitle('Загрузка...');
|
||||
setDialogDescription('Пожалуйста подождите');
|
||||
setDialogTitle('Ýüklenilýär...');
|
||||
setDialogDescription('Haýyş edýäris, garaşyň');
|
||||
setIsSuccess(false); // Reset success state before opening
|
||||
|
||||
// Trigger the mutation when the dialog opens
|
||||
|
|
@ -113,7 +113,7 @@ const PrizeCard = ({
|
|||
className="px-[24px] py-[10px] w-full md:w-fit text-textSmall leading-textSmall -tracking-[-1%] font-medium bg-lightPrimary text-lightOnPrimary rounded-[40px]"
|
||||
onClick={handleDialogOpen}
|
||||
disabled={choosePrizeMutation.isLoading}>
|
||||
{choosePrizeMutation.isLoading ? 'Loading...' : 'Saýla'}
|
||||
{choosePrizeMutation.isLoading ? 'Ýüklenilýär...' : 'Saýla'}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
|
||||
|
|
@ -123,11 +123,11 @@ const PrizeCard = ({
|
|||
<DialogTitle>{dialogTitle}</DialogTitle>
|
||||
<DialogDescription>{dialogDescription}</DialogDescription>
|
||||
</DialogHeader>
|
||||
{dialogTitle !== 'Загрузка...' && (
|
||||
{dialogTitle !== 'Ýüklenilýär...' && (
|
||||
<DialogFooter>
|
||||
<DialogClose asChild>
|
||||
<button className="px-[24px] py-[10px] w-full text-textSmall leading-textSmall -tracking-[-1%] font-medium bg-lightPrimary text-lightOnPrimary rounded-[40px]">
|
||||
Ýapmak
|
||||
Öçür
|
||||
</button>
|
||||
</DialogClose>
|
||||
</DialogFooter>
|
||||
|
|
@ -140,13 +140,13 @@ const PrizeCard = ({
|
|||
<button
|
||||
disabled
|
||||
className="px-[24px] py-[10px] w-fit text-textSmall leading-textSmall opacity-[0.12] -tracking-[-1%] font-medium bg-lightOnSurfaceDisabled text-lightOnSurface rounded-[40px]">
|
||||
Недоступно
|
||||
Elýeterli däl
|
||||
</button>
|
||||
) : variant === 'selected' ? (
|
||||
<button
|
||||
disabled
|
||||
className="px-[24px] py-[10px] w-fit text-textSmall leading-textSmall -tracking-[-1%] font-medium bg-lightOnSurfaceDisabled text-lightOnSurface rounded-[40px]">
|
||||
Выбрано
|
||||
Saýlandy
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ const SmsForm: React.FC = () => {
|
|||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
className="px-[16px] py-[12px] bg-lightPrimaryContainer rounded-[12px] outline-none text-lightOnSurfaceVariant text-textSmall leading-textSmall"
|
||||
placeholder="Введите свой промокод"
|
||||
placeholder="Öz koduňyzy giriziň
|
||||
"
|
||||
/>
|
||||
{errorMessage && (
|
||||
<p className="text-lightError text-textSmall leading-textSmall">{errorMessage}</p>
|
||||
|
|
@ -74,7 +75,7 @@ const SmsForm: React.FC = () => {
|
|||
type="submit"
|
||||
disabled={inputValue.length !== 6 || mutation.isLoading}
|
||||
className="text-textLarge leading-textLarge py-[12px] w-full flex justify-center items-center rounded-[12px] bg-lightPrimary font-medium text-lightOnPrimary">
|
||||
{mutation.isLoading ? 'Loading...' : 'Giriş'}
|
||||
{mutation.isLoading ? 'Ýüklenilýär...' : 'Giriş'}
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue