Files
channels-seerr/src/utils/navigationUtil.ts
Aidan Hilt 2f14de8545 fix: experimental basePath support PR bugs (#1409)
* 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
2025-05-26 17:44:32 +02:00

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;
};