refactor: remove console.log statements from various files for cleaner code
This commit is contained in:
parent
5f5aa18b87
commit
6cd09cce1b
7 changed files with 3 additions and 23 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { useEffect } from "react";
|
||||
import { z } from "zod/v4";
|
||||
import {
|
||||
Form,
|
||||
|
|
@ -68,12 +67,6 @@ export const FormPrezzo = ({
|
|||
stringhe_condizioni_options.length > 0 &&
|
||||
!stringhe_condizioni_options.includes(testo_condizioni)
|
||||
) {
|
||||
console.log("testo_condizioni", testo_condizioni);
|
||||
console.log(
|
||||
"stringhe_condizioni_options",
|
||||
stringhe_condizioni_options,
|
||||
);
|
||||
|
||||
ctx.addIssue({
|
||||
code: "custom",
|
||||
input: testo_condizioni,
|
||||
|
|
@ -119,13 +112,6 @@ export const FormPrezzo = ({
|
|||
|
||||
const { watch } = form;
|
||||
|
||||
useEffect(() => {
|
||||
const subscription = watch((value, { name, type }) =>
|
||||
console.log(value, name, type),
|
||||
);
|
||||
return () => subscription.unsubscribe();
|
||||
}, [watch]);
|
||||
|
||||
const scontoWch = watch(["sconto", "prezzo_cent"]);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export const useStaleImageReload = () => {
|
|||
const hasStale = document.cookie.includes(`${STALE_KEY}=1`);
|
||||
|
||||
if (hasStale) {
|
||||
console.log("Stale resource cookie detected");
|
||||
//console.log("Stale resource cookie detected");
|
||||
// Clear the cookie
|
||||
deleteCookie(STALE_KEY);
|
||||
attemptReload();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ async function uploadFile(
|
|||
})
|
||||
.parse(res);
|
||||
const fileID = parsed.id;
|
||||
console.log("File uploaded successfully.");
|
||||
return { success: true, id: fileID };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,9 +176,6 @@ export const checkFiscalCodeValidity = ({
|
|||
gen !== codiceFiscale.slice(0, 15) &&
|
||||
!(codiceFiscale in getAlternativeCF(gen))
|
||||
) {
|
||||
//console.log("gen", gen);
|
||||
//console.log("codiceFiscale", codiceFiscale);
|
||||
console.log("alternative", getAlternativeCF(gen));
|
||||
refinementContext.issues.push({
|
||||
code: "custom",
|
||||
input: "",
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ export const comunicazioniRouter = createTRPCRouter({
|
|||
.where("images_refs.ordine", "=", 0)
|
||||
.where("annunci.id", "in", input.annunci)
|
||||
.execute();
|
||||
console.log(annunci);
|
||||
|
||||
await NewMail({
|
||||
template: {
|
||||
mailType: "shareAnnunci",
|
||||
|
|
|
|||
|
|
@ -248,7 +248,6 @@ export const postAcquistoDataHandler = async ({
|
|||
servizio: ServizioUpdate;
|
||||
}): Promise<{ ordineIdForPayment: OrdiniOrdineId | null }> => {
|
||||
try {
|
||||
console.log("servizio", servizio);
|
||||
const servizioData = await db.transaction().execute(async (tx) => {
|
||||
// Update user and anagrafica data
|
||||
await tx
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export async function editFile(
|
|||
})
|
||||
.parse(res);
|
||||
const fileID = parsed.id;
|
||||
console.log("File edited successfully.");
|
||||
|
||||
return { success: true, id: fileID };
|
||||
}
|
||||
|
||||
|
|
@ -139,7 +139,6 @@ export async function deleteFile(fileID: string): Promise<DeleteResponse> {
|
|||
|
||||
// Treat redirect as success
|
||||
if (response.ok || (response.status >= 300 && response.status < 400)) {
|
||||
console.log(`File ${fileID} deleted successfully.`);
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue