"use client"; import React, { useEffect, useRef, useState } from "react"; import Image from "next/image"; import Resultimg from "../public/img/result.png"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useRouter } from "next/navigation"; import { Button } from "./ui/button"; import { useReactToPrint } from "react-to-print"; export default function Result() { const [trackingNumber, setTrackingNumber] = useState(); const [password, setPassword] = useState(); const componentRef = useRef(null); const router = useRouter(); useEffect(() => { const tn = localStorage.getItem("trackingNumber"); const pw = localStorage.getItem("password"); setTrackingNumber(tn); setPassword(pw); }, []); const handlePrint = useReactToPrint({ content: () => componentRef.current, // onBeforePrint() { // setPrintStyle(!printStyle); // }, // onAfterPrint() { // setPrintStyle(!printStyle) // }, }); return (

با تشکر از شما

درخواست شما با کد پیگیری {`${trackingNumber}`}و رمز عبور {`${password}`} در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.

{/*
*/} icon
); }