fix: kode otp

Deskripsi:
- update fungsi random nomer kode otp 4 digit
- update api version

No Issues
This commit is contained in:
amel
2025-04-11 10:43:07 +08:00
parent 5e708f0dd3
commit 080a633e48
3 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ import { LayoutLogin, WARNA } from "@/module/_global";
import { IVerification } from "@/types";
import { Anchor, Box, Button, Group, PinInput, Stack, Text, Title } from "@mantine/core";
import { useRouter } from "next/navigation";
import React, { useState } from "react";
import { useState } from "react";
import toast from "react-hot-toast";
import funSetCookies from "../../api/funSetCookies";
@@ -15,7 +15,7 @@ export default function ViewVerification({ phone, otp, user }: IVerification) {
async function onResend() {
try {
const code = Math.floor(Math.random() * 1000) + 1000
const code = Math.floor(1000 + Math.random() * 9000)
const res = await fetch(`https://wa.wibudev.com/code?nom=${phone}&text=*DARMASABA*%0A%0A
JANGAN BERIKAN KODE RAHASIA ini kepada siapa pun TERMASUK PIHAK DARMASABA. Masukkan otentikasi: *${encodeURIComponent(code)}*`)
.then(