import React, { useState, useEffect } from 'react'; import api from '../../utils/api'; import Navbar from '../../components/Navbar'; import MemberFooter from '../../components/MemberFooter'; import { Card } from '../../components/ui/card'; import { Button } from '../../components/ui/button'; import { Badge } from '../../components/ui/badge'; import { toast } from 'sonner'; import { Scale, ExternalLink, History, Check } from 'lucide-react'; export default function Bylaws() { const [currentBylaws, setCurrentBylaws] = useState(null); const [history, setHistory] = useState([]); const [showHistory, setShowHistory] = useState(false); const [loading, setLoading] = useState(true); useEffect(() => { fetchCurrentBylaws(); fetchHistory(); }, []); const fetchCurrentBylaws = async () => { try { const response = await api.get('/bylaws/current'); setCurrentBylaws(response.data); } catch (error) { if (error.response?.status !== 404) { toast.error('Failed to load current bylaws'); } } finally { setLoading(false); } }; const fetchHistory = async () => { try { const response = await api.get('/bylaws/history'); setHistory(response.data); } catch (error) { console.error('Failed to load bylaws history'); } }; const formatDate = (dateString) => { return new Date(dateString).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); }; if (loading) { return (
Loading bylaws...
Review the official governing bylaws and policies of the LOAF community.
No current bylaws document available
The bylaws serve as the governing document for LOAF, outlining the organization's structure, membership requirements, officer responsibilities, and operational procedures. All members are encouraged to familiarize themselves with these guidelines.