Fix runtime error
This commit is contained in:
@@ -70,8 +70,9 @@ const PrivateRoute = ({ children, adminOnly = false }) => {
|
||||
};
|
||||
|
||||
function App() {
|
||||
// Use /membership basename only in production
|
||||
const basename = process.env.NODE_ENV === 'production' ? '/membership' : '';
|
||||
// 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 (
|
||||
<AuthProvider>
|
||||
|
||||
Reference in New Issue
Block a user