mobile optimizations

This commit is contained in:
2026-04-06 14:42:08 -07:00
parent 997106eb92
commit 5ac736cad4
5 changed files with 5 additions and 20 deletions

View File

@@ -13,9 +13,7 @@ export default function Intro() {
const inView = rect.top < window.innerHeight && rect.bottom > 0;
const isReload = performance.getEntriesByType?.("navigation")?.[0]?.type === "reload";
const isSpaNav = !!(window as any).__astroNavigation;
const mobile = window.innerWidth < 1024;
if (inView && (mobile || isReload || isSpaNav)) {
if (inView && (isReload || isSpaNav)) {
setVisible(true);
return;
}

View File

@@ -29,9 +29,7 @@ const Stats = () => {
const inView = rect.top < window.innerHeight && rect.bottom > 0;
const isReload = performance.getEntriesByType?.("navigation")?.[0]?.type === "reload";
const isSpaNav = !!(window as any).__astroNavigation;
const mobile = window.innerWidth < 1024;
if (inView && (mobile || isReload || isSpaNav)) {
if (inView && (isReload || isSpaNav)) {
setSkipAnim(true);
setIsVisible(true);
return;

View File

@@ -36,9 +36,7 @@ const DetailedStats = () => {
const inView = rect.top < window.innerHeight && rect.bottom > 0;
const isReload = performance.getEntriesByType?.("navigation")?.[0]?.type === "reload";
const isSpaNav = !!(window as any).__astroNavigation;
const mobile = window.innerWidth < 1024;
if (inView && (mobile || isReload || isSpaNav)) {
if (inView && (isReload || isSpaNav)) {
setSkipAnim(true);
setVisible(true);
return;

View File

@@ -53,9 +53,7 @@ function TimelineCard({ item, index }: { item: (typeof timelineItems)[number]; i
const isReload = performance.getEntriesByType?.("navigation")?.[0]?.type === "reload";
const isSpaNav = !!(window as any).__astroNavigation;
const mobile = window.innerWidth < 1024;
if (inView && (mobile || isReload || isSpaNav)) {
if (inView && (isReload || isSpaNav)) {
setSkip(true);
setVisible(true);
return;