From fbd75ea1d38ccb569be0aad541b813246eca25e0 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Fri, 26 Dec 2025 18:37:13 -0800 Subject: [PATCH 1/4] cycle before and after images every 1.5 seconds --- web/src/app/mapfixes/[mapfixId]/page.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index b295be8..2dec7b8 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -1,6 +1,6 @@ import Webpage from "@/app/_components/webpage"; import { useParams, useNavigate } from "react-router-dom"; -import {useState} from "react"; +import {useState, useEffect} from "react"; import { Link } from "react-router-dom"; import { useAssetThumbnail } from "@/app/hooks/useThumbnails"; @@ -121,6 +121,15 @@ export default function MapfixDetailsPage() { }; + // cycle before and after images every 1.5 seconds + useEffect(() => { + const interval = setInterval(() => { + setShowBeforeImage((prev) => !prev); + }, 1500); + + return () => clearInterval(interval); + }, []); + const handleCommentSubmit = async () => { if (!newComment.trim()) { return; // Don't submit empty comments @@ -363,7 +372,6 @@ export default function MapfixDetailsPage() { background: 'linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.05))', }, }} - onClick={() => setShowBeforeImage(!showBeforeImage)} /> -- 2.49.1 From 4d3374f837cd7ac6b3e01b2390e36066a82a266f Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Fri, 26 Dec 2025 20:51:16 -0800 Subject: [PATCH 2/4] remove click to compare box --- web/src/app/mapfixes/[mapfixId]/page.tsx | 27 ------------------------ 1 file changed, 27 deletions(-) diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index 2dec7b8..509c937 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -332,33 +332,6 @@ export default function MapfixDetailsPage() { )} - - - Click to compare - - - Date: Fri, 26 Dec 2025 20:52:13 -0800 Subject: [PATCH 3/4] increase cycle to 2s --- web/src/app/mapfixes/[mapfixId]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index 509c937..79a87c3 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -125,7 +125,7 @@ export default function MapfixDetailsPage() { useEffect(() => { const interval = setInterval(() => { setShowBeforeImage((prev) => !prev); - }, 1500); + }, 2000); return () => clearInterval(interval); }, []); -- 2.49.1 From 87c2e3e07fc8af6933d973b73c8dd63cfcaeda98 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Fri, 26 Dec 2025 21:24:17 -0800 Subject: [PATCH 4/4] fix comment --- web/src/app/mapfixes/[mapfixId]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index 79a87c3..4923c4e 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -121,7 +121,7 @@ export default function MapfixDetailsPage() { }; - // cycle before and after images every 1.5 seconds + // cycle before and after images every 2 seconds useEffect(() => { const interval = setInterval(() => { setShowBeforeImage((prev) => !prev); -- 2.49.1