From 4aec1337b582ea80eaab120ffd10faff4e8b3203 Mon Sep 17 00:00:00 2001 From: kbinreallife <141305609+kbinreallife@users.noreply.github.com> Date: Sun, 26 May 2024 05:04:45 +0000 Subject: [PATCH] revert to 2 wide column --- src/app/page.js | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/app/page.js b/src/app/page.js index 312150a..c4e0461 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -1,6 +1,7 @@ 'use client' + import dynamic from 'next/dynamic'; -import React, { useState, useEffect, useRef, useCallback } from 'react'; +import React, { useState, useEffect, useRef } from 'react'; import Head from 'next/head'; const DynamicHome = dynamic(() => import('./globals.css'), { ssr: false }); @@ -13,7 +14,7 @@ export default function Home() { const toggleSection = (section) => { setShowSection(showSection === section ? null : section); }; - + const hideAllSections = () => { setShowSection(null); }; @@ -30,25 +31,12 @@ export default function Home() { }; }, []); - const handleClickLink = useCallback((section) => { + const handleClickLink = (section) => { return (event) => { event.stopPropagation(); toggleSection(section); }; - }, []); - - // Preload images - const preloadImages = useCallback(() => { - badges.forEach((badge) => { - const img = new Image(); - img.src = badge.imageUrl; - }); - }, []); - - // Call preloadImages function when the component mounts - useEffect(() => { - preloadImages(); - }, [preloadImages]); + }; const badges = [ { @@ -193,7 +181,7 @@ export default function Home() { {showSection === 'badges' && (

Badges

-
+
{badges.map((badge, index) => ( e.stopPropagation()} className="grid-item"> {`Badge ))} @@ -209,6 +196,7 @@ export default function Home() {
)} + {/* Contact Section */} {showSection === 'contact' && (