Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 0 additions & 28 deletions .env.example

This file was deleted.

17 changes: 17 additions & 0 deletions analyze-lint.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const fs = require('fs');
const data = JSON.parse(fs.readFileSync('lint-results.json', 'utf8'));
const counts = {};
data.forEach(f => {
f.messages.forEach(m => {
counts[m.ruleId] = (counts[m.ruleId] || 0) + 1;
});
});
console.log(JSON.stringify(counts, null, 2));

const filesToFix = data.filter(f => f.messages.length > 0);
filesToFix.forEach(f => {
console.log(f.filePath);
f.messages.forEach(m => {
console.log(` Line ${m.line}: ${m.message} (${m.ruleId})`);
});
});
Empty file added analyze-output.txt
Empty file.
Binary file added errors.txt
Binary file not shown.
Empty file added eslint-compact.txt
Empty file.
360 changes: 360 additions & 0 deletions eslint-out.txt

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ export default defineConfig([
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'no-unused-vars': 'warn',
'react-refresh/only-export-components': 'warn',
'no-empty': 'warn',
'no-useless-catch': 'warn',
'no-undef': 'warn',
'react-hooks/rules-of-hooks': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'no-unsafe-finally': 'warn',
'no-constant-binary-expression': 'warn',
},
},
])
Binary file added lint-results.json
Binary file not shown.
14 changes: 10 additions & 4 deletions src/features/auth/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const Login = () => {
const onSubmit = async data => {
try {
await login({ ...data, remember: data.remember || false });
} catch { }
} catch {}
};

const togglePasswordVisibility = () => {
Expand Down Expand Up @@ -270,10 +270,16 @@ const Login = () => {
</button>

<div
className={`absolute inset-0 z-10 ${isGoogleReady ? 'opacity-0' : 'opacity-0 pointer-events-none'
}`}
className={`absolute inset-0 z-10 ${
isGoogleReady
? 'opacity-0'
: 'opacity-0 pointer-events-none'
}`}
>
<div ref={googleButtonRef} className="w-full flex justify-center" />
<div
ref={googleButtonRef}
className="w-full flex justify-center"
/>
</div>
</div>
</div>
Expand Down
12 changes: 9 additions & 3 deletions src/features/auth/components/registerModal/RegisterModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ const ModalRegister = ({ isOpen, onClose }) => {
client_id: clientId,
callback: async response => {
try {
await loginWithGoogle({ idToken: response.credential, remember: false });
await loginWithGoogle({
idToken: response.credential,
remember: false,
});
handleClose();
navigate('/dashboard', { replace: true });
} catch {
Expand Down Expand Up @@ -446,8 +449,11 @@ const ModalRegister = ({ isOpen, onClose }) => {
</button>

<div
className={`absolute inset-0 z-10 ${isGoogleReady ? 'opacity-0' : 'opacity-0 pointer-events-none'
}`}
className={`absolute inset-0 z-10 ${
isGoogleReady
? 'opacity-0'
: 'opacity-0 pointer-events-none'
}`}
>
<div
ref={googleButtonRef}
Expand Down
30 changes: 21 additions & 9 deletions src/features/calendario/CalendarioPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ const Calendar = () => {
return (
<div className="bg-background content-box-outline-small h-full flex flex-col p-0.5">
<div className="flex items-center justify-between mb-0.25">
<h2 className="text-sm font-semibold text-primary capitalize">{monthName}</h2>
<h2 className="text-sm font-semibold text-primary capitalize">
{monthName}
</h2>
<div className="flex gap-0.5">
<button
onClick={handlePrevMonth}
Expand All @@ -78,8 +80,11 @@ const Calendar = () => {
</div>

<div className="grid grid-cols-7 gap-0.5 mb-0.25">
{weekDays.map((day) => (
<div key={day} className="text-center text-secondary text-[9px] font-medium">
{weekDays.map(day => (
<div
key={day}
className="text-center text-secondary text-[9px] font-medium"
>
{day}
</div>
))}
Expand All @@ -89,12 +94,13 @@ const Calendar = () => {
{calendarDays.map((dayObj, index) => {
const todayDate = new Date();
todayDate.setHours(0, 0, 0, 0);

const cellDate = new Date(year, month, dayObj.day);
cellDate.setHours(0, 0, 0, 0);

const isDatePassed = dayObj.currentMonth && cellDate < todayDate;
const hasEvent = dayObj.currentMonth && (dayObj.day === 20 || dayObj.day === 25);
const hasEvent =
dayObj.currentMonth && (dayObj.day === 20 || dayObj.day === 25);

return (
<div
Expand Down Expand Up @@ -132,21 +138,27 @@ const CalendarioPage = () => {
<div className="grid grid-cols-3 gap-1.5 flex-shrink-0 px-2 pt-0.5">
{/* Viajes programados */}
<div className="bg-primary text-on-primary content-box-small py-1.5 px-2">
<span className="opacity-08 text-[10px] font-light block">Viajes</span>
<span className="opacity-08 text-[10px] font-light block">
Viajes
</span>
<span className="text-base font-bold">8</span>
<p className="text-[8px] opacity-80 mt-0.5">Este mes</p>
</div>

{/* Próximo turno */}
<div className="content-box-outline-small py-1.5 px-2">
<span className="text-[10px] font-light text-secondary block">Próximo</span>
<span className="text-[10px] font-light text-secondary block">
Próximo
</span>
<span className="text-base text-primary font-bold">12 Dic</span>
<p className="text-[8px] text-secondary mt-0.5">4:00 AM</p>
</div>

{/* Viajes completados */}
<div className="content-box-outline-small py-1.5 px-2">
<span className="text-[10px] font-light text-secondary block">Completados</span>
<span className="text-[10px] font-light text-secondary block">
Completados
</span>
<span className="text-base text-primary font-bold">5</span>
<p className="text-[8px] text-secondary mt-0.5">95%</p>
</div>
Expand Down
Loading