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 790365c..9d91d53 100644 --- a/package.json +++ b/package.json @@ -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", 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/src/App.js b/src/App.js index b3c327b..30ffde2 100644 --- a/src/App.js +++ b/src/App.js @@ -70,9 +70,13 @@ 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 ( - + } /> } /> diff --git a/src/pages/Landing.js b/src/pages/Landing.js index a30f9f4..75dc7c8 100644 --- a/src/pages/Landing.js +++ b/src/pages/Landing.js @@ -88,7 +88,7 @@ const Landing = () => { LOAF
- +