Fix runtime error

This commit is contained in:
Koncept Kit
2025-12-20 18:46:07 +07:00
parent 4093c1603e
commit 33fc3a101d
3 changed files with 21 additions and 2 deletions

View File

@@ -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>