* Bugfixes for the experimental basepath feature * Added a redirect to baseURL for the user context * Addressing PR comments * Reverting formatting changes to _app.tsx * Running pnpm format
5 lines
188 B
TypeScript
5 lines
188 B
TypeScript
export const getBasedPath = (path: string) => {
|
|
const API_BASE = process.env.NEXT_PUBLIC_BASE_PATH || '';
|
|
return path.startsWith('/') && path !== '/' ? `${API_BASE}${path}` : path;
|
|
};
|