From a7a6e965979f7c46c2511a33cb601172573f3c84 Mon Sep 17 00:00:00 2001
From: zwlucas <lucas.oliveira1676@etec.sp.gov.br>
Date: Tue, 1 Apr 2025 14:30:52 -0300
Subject: removed cpf

---
 app/confirmar/page.tsx | 41 +++--------------------------------------
 1 file changed, 3 insertions(+), 38 deletions(-)

(limited to 'app/confirmar/page.tsx')

diff --git a/app/confirmar/page.tsx b/app/confirmar/page.tsx
index a8b6f1c..5ca80a1 100644
--- a/app/confirmar/page.tsx
+++ b/app/confirmar/page.tsx
@@ -18,50 +18,22 @@ export default function ConfirmPage() {
   const searchParams = useSearchParams();
   const rm = searchParams.get("rm") || "";
   const nome = searchParams.get("nome") || "";
-  const cpf = searchParams.get("cpf") || "";
 
   useEffect(() => {
-    if (!rm || !nome || !cpf) {
+    if (!rm || !nome) {
       router.push("/");
       return;
     }
-  }, [rm, nome, cpf, router]);
+  }, [rm, nome, router]);
 
   const handleConfirm = () => {
-    router.push(`/votar?rm=${rm}&nome=${encodeURIComponent(nome)}&cpf=${cpf}`);
+    router.push(`/votar?rm=${rm}&nome=${encodeURIComponent(nome)}`);
   };
 
   const handleCancel = () => {
     router.push("/");
   };
 
-  const formatCPFDisplay = (cpf: string) => {
-    if (cpf.includes(".") || cpf.includes("-")) return cpf;
-
-    const cpfClean = cpf.replace(/\D/g, "");
-
-    if (cpfClean.length === 11) {
-      return `${cpfClean.substring(0, 3)}.${cpfClean.substring(
-        3,
-        6
-      )}.${cpfClean.substring(6, 9)}-${cpfClean.substring(9, 11)}`;
-    }
-
-    return cpf;
-  };
-
-  const maskCPF = (cpf: string) => {
-    const formatted = formatCPFDisplay(cpf);
-    const parts = formatted.split(".");
-    if (parts.length === 3) {
-      const lastPart = parts[2].split("-");
-      if (lastPart.length === 2) {
-        return `${parts[0]}.${parts[1]}.${"***"}-${lastPart[1]}`;
-      }
-    }
-    return formatted;
-  };
-
   return (
     <div className="flex min-h-screen flex-col items-center justify-center bg-[#f0f5fa] px-4 sm:px-6 lg:px-8">
       <div className="w-full max-w-md sm:max-w-lg lg:max-w-xl">
@@ -99,13 +71,6 @@ export default function ConfirmPage() {
           <div className="text-xs sm:text-sm font-bold text-[#004a93]">
             {nome}
           </div>
-
-          <div className="text-xs sm:text-sm font-medium text-[#004a93]">
-            CPF:
-          </div>
-          <div className="text-xs sm:text-sm font-bold text-[#004a93]">
-            {maskCPF(cpf)}
-          </div>
           </div>
         </div>
 
-- 
cgit v1.2.3

