fix: kode otp
Deskripsi: - update fungsi random nomer kode otp 4 digit - update api version No Issues
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user