From 56bd8678148bc0035f7ba1263c5db10962eeb53e Mon Sep 17 00:00:00 2001 From: TheMaddax Date: Tue, 15 Oct 2024 07:18:03 -0500 Subject: [PATCH] Fix bylaws for mobile --- client/src/components/Bylaws.tsx | 43 ++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/client/src/components/Bylaws.tsx b/client/src/components/Bylaws.tsx index de3c66b..909b50f 100644 --- a/client/src/components/Bylaws.tsx +++ b/client/src/components/Bylaws.tsx @@ -1,7 +1,20 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; const Bylaws: React.FC = () => { + const [isMobile, setIsMobile] = useState(false); + + useEffect(() => { + const checkMobile = () => { + setIsMobile(window.innerWidth < 768); // Adjust this breakpoint as needed + }; + + checkMobile(); + window.addEventListener('resize', checkMobile); + + return () => window.removeEventListener('resize', checkMobile); + }, []); + return (
{ transition={{ duration: 0.5 }} className="bg-white rounded-lg shadow-lg p-4" > -
-