Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4d4ce46
Merge pull request #1 from studio-a1/gh-pages
studio-a1 Aug 21, 2025
4dc6297
Create jekyll-gh-pages.yml
studio-a1 Aug 21, 2025
a259f6c
Update index.html
studio-a1 Aug 22, 2025
f599b1e
Update index.html
studio-a1 Aug 22, 2025
fc66fb8
Update index.tsx
studio-a1 Aug 22, 2025
f385f1c
Update App.tsx
studio-a1 Aug 22, 2025
f31cd62
Update package.json
studio-a1 Aug 22, 2025
895ce0c
Update Calculator.tsx
studio-a1 Aug 22, 2025
03eb556
Update vite.config.ts
studio-a1 Aug 22, 2025
e7f8aa0
Update metadata.json
studio-a1 Aug 22, 2025
9367694
Update tsconfig.json
studio-a1 Aug 22, 2025
886ba7d
refactor: Update application name and build config
studio-a1 Aug 22, 2025
88a57ff
Update index.html
studio-a1 Aug 22, 2025
c3432c8
Update index.html
studio-a1 Aug 22, 2025
dad981d
feat: Update script path for module loading
studio-a1 Aug 22, 2025
f433b82
Update index.html
studio-a1 Aug 22, 2025
03e42c9
feat: Update app description for clarity
studio-a1 Aug 22, 2025
9ae3e40
fix: Correct script path in index.html
studio-a1 Aug 22, 2025
643e5d6
feat: Update script loading and import maps
studio-a1 Aug 22, 2025
9122ca1
feat: Update script loading to use Vite via importmap
studio-a1 Aug 22, 2025
93f09b5
fix: Correct script path in index.html
studio-a1 Aug 23, 2025
dd5f54e
feat: Update React to v19.1.1
studio-a1 Aug 23, 2025
f77e162
feat: Update React import map
studio-a1 Aug 23, 2025
d63d0ac
Update index.html
studio-a1 Aug 23, 2025
452fae6
Update index.html
studio-a1 Aug 23, 2025
c3cadb2
solucao
Aug 23, 2025
fb58e25
fix: 2 from index.html
Aug 23, 2025
e610a7f
fix: Resolve merge conflict and clean up index.html
Aug 23, 2025
90a1ff0
Revert "fix: Resolve merge conflict and clean up index.html"
Aug 23, 2025
5409abc
fix: 3 from index.html
Aug 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

import React from 'react';
import Calculator from './components/Calculator.tsx';
import Calculator from './components/Calculator';

const CarIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" className="h-8 w-8 sm:h-9 sm:w-9 mr-3 inline-block" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
Expand All @@ -22,7 +23,7 @@ function App() {
MotorApp_Calculator
</h1>
<p className="text-slate-400">
Sua ferramenta para calcular a viabilidade de corridas e entregas.
Uma ferramenta para calcular a viabilidade de viagens, corridas, entregas e rolés.
</p>
</header>
<main className="max-w-5xl mx-auto">
Expand All @@ -32,4 +33,4 @@ function App() {
);
}

export default App;
export default App;
5 changes: 3 additions & 2 deletions components/Calculator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

import React, { useState, useMemo, useCallback } from 'react';
import type { FormData, CalculationResults } from '../types.ts';
import type { FormData, CalculationResults } from '../types';

// --- HELPER UI COMPONENTS (Defined outside main component to prevent re-creation on re-render) ---

Expand Down Expand Up @@ -461,4 +462,4 @@ const Calculator: React.FC = () => {
);
};

export default Calculator;
export default Calculator;
34 changes: 20 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@

<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>MotorApp_Calculator</title>
<script src="https://cdn.tailwindcss.com"></script>
<!-- Add Babel for in-browser JSX/TSX transpilation -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="importmap">
{
"imports": {
"react-dom/": "https://esm.sh/react-dom@^19.1.1/",
"react/": "https://esm.sh/react@^19.1.1/",
"react": "https://esm.sh/react@^19.1.1"
}
}
</script>
<style>
@media print {
body {
Expand Down Expand Up @@ -52,10 +40,28 @@
}
}
</style>
</head>
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/react@^19.1.1",
"react-dom/": "https://esm.sh/react-dom@^19.1.1/",
"react/": "https://esm.sh/react@^19.1.1/",
"vite": "https://esm.sh/vite@^7.1.3",
"@vitejs/plugin-react": "https://esm.sh/@vitejs/plugin-react@^5.0.1"
}
}
</script>
</head>
<body>
<div id="root"></div>

<script type="module" src="/index.tsx"></script>


<script type="module" src="index.tsx"></script>

<!-- Change script type to text/babel for transpilation -->
<script type="text/babel" data-type="module" src="./index.tsx"></script>
<script type="text/babel" data-type="module" src="index.tsx"></script>

</body>
</html>
4 changes: 2 additions & 2 deletions index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import App from './App';

const rootElement = document.getElementById('root');
if (!rootElement) {
Expand All @@ -13,4 +13,4 @@ root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
);
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Ride-Share Profit Calculator",
"name": "MotorApp_Calculator1",
"description": "A calculator for ride-share and delivery drivers to determine the profitability of a trip by considering vehicle expenses, fuel costs, and earnings. Applicable to both cars and motorcycles, it helps drivers make informed decisions.",
"requestFramePermissions": []
}
Loading