Skip to content

Commit e096d47

Browse files
Sync code from main
2 parents 619971a + 727d025 commit e096d47

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/PortfolioPreviewModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ type Props = {
270270
onClose: () => void
271271
}
272272

273-
export function PortfolioPreviewModal({ user, repos: _, allRepos, onClose }: Props) {
273+
export function PortfolioPreviewModal({ user, repos, allRepos, onClose }: Props) {
274274
// Lock body scroll
275275
useEffect(() => {
276276
const prev = document.body.style.overflow
@@ -283,7 +283,7 @@ export function PortfolioPreviewModal({ user, repos: _, allRepos, onClose }: Pro
283283

284284
const hero = buildHero(user, allRepos)
285285
const snapshot = buildSnapshot(user, allRepos)
286-
const repos = buildRepos(allRepos)
286+
const previewRepos = buildRepos(repos.length > 0 ? repos : allRepos)
287287
const stats = buildStats(user, allRepos)
288288

289289
return createPortal(
@@ -328,7 +328,7 @@ export function PortfolioPreviewModal({ user, repos: _, allRepos, onClose }: Pro
328328
<GitHubSection
329329
title="GitHub"
330330
body={`${user.name || user.login}'s public repositories on GitHub.`}
331-
repos={repos}
331+
repos={previewRepos}
332332
/>
333333
<StatsSection stats={stats} />
334334

src/templates/threejs/ThreeBarChart.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface ThreeBarChartProps {
1414
}
1515

1616
const EASE_DURATION = 1100 // ms
17+
const TOOLTIP_TOP_OFFSET = 0.1
1718

1819
function easeOutCubic(t: number) {
1920
return 1 - Math.pow(1 - t, 3)
@@ -158,7 +159,7 @@ export default function ThreeBarChart({
158159
if (hoveredIdx >= 0) {
159160
const d = data[hoveredIdx]
160161
const pos3 = bars[hoveredIdx].mesh.position.clone()
161-
pos3.y = bars[hoveredIdx].mesh.scale.y * bars[hoveredIdx].targetH
162+
pos3.y = bars[hoveredIdx].mesh.scale.y + TOOLTIP_TOP_OFFSET
162163
const projected = pos3.clone().project(camera)
163164
setTooltip({
164165
x: ((projected.x + 1) / 2) * w,

0 commit comments

Comments
 (0)