Skip to content

Commit 6f251d9

Browse files
author
Ema
committed
fix for light years
1 parent b3734af commit 6f251d9

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/components/OrbitSystem.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useState, useEffect } from 'react';
2-
import { useNavigate } from 'react-router';
3-
import { HeartCrack, Heart } from 'lucide-react';
2+
import { Heart } from 'lucide-react';
43
import { mockAliens } from '../data/mockAliens';
54
import type { AlienProfile } from '../data/mockAliens';
65
import { useAppContext } from '../context/AppContext';
@@ -9,12 +8,12 @@ import { getCompatibility } from '../utils/compatibility';
98
import { useRocketNav } from '../context/TransitionContext';
109

1110
export default function OrbitSystem() {
12-
const navigate = useNavigate();
11+
1312
const { preferences, addMatch, matches } = useAppContext();
1413
const triggerRocketNav = useRocketNav();
1514
const [selectedAlien, setSelectedAlien] = useState<AlienProfile | null>(null);
1615
const [dismissedIds, setDismissedIds] = useState<Set<string>>(new Set());
17-
const [showBreakingAnim, setShowBreakingAnim] = useState(false);
16+
1817
const [animStage, setAnimStage] = useState<'none' | 'heart' | 'break' | 'final'>('none');
1918

2019
// Keep exactly 5 slots for the 5 orbit tracks

src/pages/Chat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ Keep it friendly, slightly flirtatious, and warmly confusing. Keep the grammar s
174174
<img src={alien.profilePic} alt={alien.name} style={{ width: '50px', height: '50px', borderRadius: '50%', objectFit: 'cover' }} />
175175
<div>
176176
<h3 style={{ margin: 0, color: 'var(--color-primary)' }}>{alien.name}</h3>
177-
<span style={{ fontSize: '0.8rem', color: 'rgba(234, 222, 218, 0.6)' }}>{alien.alienType}{alien.distanceAU} AU away</span>
177+
<span style={{ fontSize: '0.8rem', color: 'rgba(234, 222, 218, 0.6)' }}>{alien.alienType}{alien.distanceLY} LY away</span>
178178
</div>
179179
</div>
180180

181181
{/* Chat Messages */}
182182
<div style={{ flex: 1, padding: '20px', overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: '16px' }}>
183183
{messages.length === 0 && (
184184
<div style={{ textAlign: 'center', margin: '20px 0', color: 'rgba(234, 222, 218, 0.4)', fontSize: '0.9rem' }}>
185-
Connection established across {alien.distanceAU} AU. Say hello!
185+
Connection established across {alien.distanceLY} LY. Say hello!
186186
</div>
187187
)}
188188

src/utils/compatibility.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export function getCompatibility(alien: AlienProfile, prefs: UserPreferences | n
4343
}
4444

4545
// Distance Match (max 10)
46-
if (prefs.maxDistanceAU > 0) {
47-
const distanceScore = Math.max(0, 1 - (alien.distanceAU / prefs.maxDistanceAU));
46+
if (prefs.maxDistanceLY > 0) {
47+
const distanceScore = Math.max(0, 1 - (alien.distanceLY / prefs.maxDistanceLY));
4848
score += distanceScore * 10;
4949
} else {
5050
score += 5;

0 commit comments

Comments
 (0)