Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Commit 3e16792

Browse files
authored
Merge pull request #13 from XDukeHD/development
Refactor: Remove unnecessary comments and console logs across various components and services - Removed console logs from ServerConsole, Testimonials, ExternalScripts, Header, and other components for cleaner code. - Eliminated redundant comments that describe obvious code functionality in ServerConsole, MtaPlans, SampPlans, and Vps components. - Updated tailwind.config.js to include additional screen breakpoints for better responsiveness. - Cleaned up WebSocket connection handling in FireHostingWebSocket and ServerConsoleWebSocket by removing debug logs. - Streamlined API service files by removing comments that do not add value to the code understanding.
2 parents 16d6691 + fbdae5e commit 3e16792

74 files changed

Lines changed: 4156 additions & 1706 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"http-proxy-middleware": "^3.0.5",
2020
"isomorphic-dompurify": "^2.25.0",
2121
"js-cookie": "^3.0.5",
22+
"lucide-react": "^0.544.0",
2223
"next": "^15.3.5",
2324
"next-themes": "^0.2.1",
2425
"react": "^18.2.0",

public/images/bg-cartoon.svg

Lines changed: 91 additions & 0 deletions
Loading

src/app/checkout/[service]/[plan]/page.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ const CheckoutPageComponent = () => {
166166
const rawPlanName = params?.plan || '';
167167

168168
const planName = decodeURIComponent(rawPlanName);
169-
// Create a clean version without the "+" for API use
170169
const cleanPlanName = planName.replace(/\+/g, "");
171170

172171
const isMinecraft = service.toLowerCase() === "minecraft";
@@ -180,10 +179,8 @@ const CheckoutPageComponent = () => {
180179
setSelectedCycle(billingFromUrl);
181180
}
182181

183-
// Verificar se existe um código de afiliado no cookie
184182
const utmCode = getCookie('utm_code');
185183
if (utmCode) {
186-
console.log(`Checkout detectou código de afiliado: ${utmCode}`);
187184
}
188185
}, [searchParams]);
189186

@@ -201,12 +198,10 @@ const CheckoutPageComponent = () => {
201198
}
202199
}, [authContext, router, service, planName, searchParams]);
203200

204-
// Set default values for MTA and SAMP services
205201
useEffect(() => {
206202
if (isMTA || isSAMP) {
207-
// Set default server name and egg ID for MTA and SAMP
208203
setServerName(isMTA ? "MTA Server" : "SAMP Server");
209-
setEggId(isMTA ? "13" : "14"); // Assuming these are the correct egg IDs
204+
setEggId(isMTA ? "13" : "14");
210205
}
211206
}, [isMTA, isSAMP]);
212207

@@ -385,48 +380,37 @@ const CheckoutPageComponent = () => {
385380
return;
386381
}
387382

388-
// Create request body based on service type
389383
let body: any = {
390384
pid: plan.id,
391385
billingcycle: selectedCycle,
392386
};
393387

394-
// Only add customfields if it's NOT MTA or SAMP
395388
if (!isMTA && !isSAMP) {
396389
if (isMinecraft) {
397390
body.customfields = { server_name: serverName, egg_id: eggId };
398391
} else {
399392
body.customfields = { OS: osId };
400393
}
401394
}
402-
// For MTA and SAMP, no customfields at all
403395

404396
if (appliedCoupon) {
405397
body.promocode = appliedCoupon.code;
406398
}
407399

408-
// Verificar se existe utm_code no cookie e adicionar ao body
409400
const utmCode = getCookie('utm_code');
410401
if (utmCode) {
411402
body.utm_code = utmCode;
412-
console.log(`Código de afiliado detectado: ${utmCode}`);
413403
}
414404

415-
// Use specific API endpoints for MTA and SAMP services
416405
const endpoint = isMTA ? `/v1/users/payment/create` :
417406
isSAMP ? `/v1/users/payment/create` :
418407
`/v1/users/payment/create`;
419-
420-
// For plan-specific endpoints like MTA/SAMP, make sure we're passing the clean plan name
421-
// without any "+" characters
408+
422409
if (isMTA || isSAMP) {
423-
// Add the clean plan name to the body
424410
body.plan = cleanPlanName;
425411
}
426412

427-
// Make sure we're only sending what's necessary
428413
const requestBody = JSON.stringify(body);
429-
console.log(`Sending request to ${endpoint}:`, requestBody);
430414

431415
const response = await fetch(`${apiUrl}${endpoint}`, {
432416
method: "POST",

0 commit comments

Comments
 (0)