0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-13 21:30:30 -05:00
logto/packages/console/src/utilities/router.ts

6 lines
244 B
TypeScript

export const getBasename = (prefix: string, developmentPort: string): string => {
const isBasenameNeeded =
process.env.NODE_ENV !== 'development' || process.env.PORT === developmentPort;
return isBasenameNeeded ? '/' + prefix : '';
};