"use client"; import React, { useEffect } from "react"; // import { convertDate } from "@/lib/utils"; import dayjs from "dayjs"; interface PrintPageProps { contentRef: React.RefObject; fetchedContent: string; trackingNumber: string; password: string; } // Convert Date function convertDate(date: string) { const convertedDate = dayjs(date) .calendar("jalali") .locale("fa") .format("YYYY/M/DD"); return convertedDate; } // const registeredAt = localStorage.getItem("registeredAt"); // const convertedDate = registeredAt ? convertDate(registeredAt) : "Invalid Date"; const currentDate = new Date(); const formattedDate = currentDate.toISOString(); const convertedDate = convertDate(formattedDate); const PrintPage: React.FC = ({ contentRef, fetchedContent, trackingNumber, password, }) => { return (

سامانه نظارت شهرداری یزد

تاریخ: {convertedDate}

کد پیگیری : {trackingNumber}

رمز عبور : {password}

); }; export default PrintPage;