diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..6ec835a --- /dev/null +++ b/.env.development @@ -0,0 +1,3 @@ +REACT_APP_BACKEND_URL=http://localhost:8000 +REACT_APP_BASENAME=/membership +PUBLIC_URL=/membership diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..cd05187 --- /dev/null +++ b/.env.example @@ -0,0 +1,17 @@ +# Server Configuration +PORT=3000 +WDS_SOCKET_PORT=443 + +# Backend API URL +REACT_APP_BACKEND_URL=http://localhost:8000 + +# App Base Path Configuration +# Examples: +# - For root path: REACT_APP_BASENAME= +# - For subpath: REACT_APP_BASENAME=/membership +# - For production: REACT_APP_BASENAME=/membership +REACT_APP_BASENAME= + +# Feature Flags +REACT_APP_ENABLE_VISUAL_EDITS=false +ENABLE_HEALTH_CHECK=false diff --git a/.gitignore b/.gitignore index 40ddf43..09002e2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # Environment .env +.env.production # dependencies /node_modules diff --git a/package.json b/package.json index aee0313..5663868 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "frontend", "version": "0.1.0", "private": true, - "homepage": "/membership", + "homepage": "/", "dependencies": { "@fontsource/dm-sans": "^5.2.8", "@fontsource/fraunces": "^5.2.9", @@ -53,9 +53,11 @@ "react-dom": "^19.0.0", "react-hook-form": "^7.56.2", "react-icons": "^5.5.0", + "react-markdown": "^10.1.0", "react-resizable-panels": "^3.0.1", "react-router-dom": "^7.5.1", "react-scripts": "5.0.1", + "remark-gfm": "^4.0.1", "sonner": "^2.0.3", "tailwind-merge": "^3.2.0", "tailwindcss-animate": "^1.0.7", @@ -83,6 +85,7 @@ "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@craco/craco": "^7.1.0", "@eslint/js": "9.23.0", + "@tailwindcss/typography": "^0.5.19", "autoprefixer": "^10.4.20", "eslint": "9.23.0", "eslint-plugin-import": "2.31.0", diff --git a/public/friendships.png b/public/friendships.png new file mode 100644 index 0000000..54bf5b9 Binary files /dev/null and b/public/friendships.png differ diff --git a/public/index.html b/public/index.html index d765e5c..05d5ccb 100644 --- a/public/index.html +++ b/public/index.html @@ -25,7 +25,6 @@ Learn how to configure a non-root public URL by running `npm run build`. --> LOAF - Lesbians Over Age Fifty - diff --git a/public/shooting_star_2.png b/public/shooting_star_2.png new file mode 100644 index 0000000..b93021a Binary files /dev/null and b/public/shooting_star_2.png differ diff --git a/public/web_elements_tagline.png b/public/web_elements_tagline.png new file mode 100644 index 0000000..7121b62 Binary files /dev/null and b/public/web_elements_tagline.png differ diff --git a/src/App.js b/src/App.js index b3c327b..d706f13 100644 --- a/src/App.js +++ b/src/App.js @@ -23,6 +23,7 @@ import AdminMembers from './pages/admin/AdminMembers'; import AdminPermissions from './pages/admin/AdminPermissions'; import AdminRoles from './pages/admin/AdminRoles'; import AdminEvents from './pages/admin/AdminEvents'; +import AdminEventAttendance from './pages/admin/AdminEventAttendance'; import AdminValidations from './pages/admin/AdminValidations'; import AdminPlans from './pages/admin/AdminPlans'; import AdminSubscriptions from './pages/admin/AdminSubscriptions'; @@ -50,6 +51,8 @@ import Resources from './pages/Resources'; import ContactUs from './pages/ContactUs'; import TermsOfService from './pages/TermsOfService'; import PrivacyPolicy from './pages/PrivacyPolicy'; +import AcceptInvitation from './pages/AcceptInvitation'; +import NotFound from './pages/NotFound'; const PrivateRoute = ({ children, adminOnly = false }) => { const { user, loading } = useAuth(); @@ -70,14 +73,19 @@ const PrivateRoute = ({ children, adminOnly = false }) => { }; function App() { + // Read basename from environment variable (defaults to empty string for root path) + // Set REACT_APP_BASENAME in .env to use a subpath (e.g., "/membership") + const basename = process.env.REACT_APP_BASENAME || ''; + return ( - + } /> } /> } /> } /> + } /> } /> } /> } /> + + + + + + } /> @@ -274,6 +289,9 @@ function App() { } /> + + {/* 404 - Catch all undefined routes */} + } /> diff --git a/src/components/AdminSidebar.js b/src/components/AdminSidebar.js index 7f80a5c..fc70405 100644 --- a/src/components/AdminSidebar.js +++ b/src/components/AdminSidebar.js @@ -22,7 +22,7 @@ import { Scale, HardDrive, Repeat, - Heart + Heart, } from 'lucide-react'; const AdminSidebar = ({ isOpen, onToggle, isMobile }) => { @@ -40,7 +40,7 @@ const AdminSidebar = ({ isOpen, onToggle, isMobile }) => { try { const response = await api.get('/admin/users'); const pending = response.data.filter(u => - ['pending_validation', 'pre_validated'].includes(u.status) + ['pending_email', 'pending_validation', 'pre_validated', 'payment_pending'].includes(u.status) ); setPendingCount(pending.length); } catch (error) { @@ -204,8 +204,8 @@ const AdminSidebar = ({ isOpen, onToggle, isMobile }) => { ${item.disabled ? 'opacity-50 cursor-not-allowed text-[#664fa3]' : active - ? 'bg-[#ff9e77]/10 text-[#ff9e77]' - : 'text-[#422268] hover:bg-[#DDD8EB]/20' + ? 'bg-[#ff9e77]/10 text-[#ff9e77]' + : 'text-[#422268] hover:bg-[#DDD8EB]/20' } `} > @@ -265,20 +265,24 @@ const AdminSidebar = ({ isOpen, onToggle, isMobile }) => { > {/* Header */}
-
+ LOAF Logo {isOpen && ( -

- Admin -

+
+

+ Admin +

+

+ View Public Site +

+
)} -
+
{/* Navigation */} -