fix: storefront live search relative URLs + auth error messages + TPV clock
- Storefront: use relative URLs in api.ts (fix ERR_ADDRESS_UNREACHABLE) - Auth: show specific error for EMAIL_NOT_CONFIRMED - TPV: add clock with date/time, modern SVG icons, panel toggle left
This commit is contained in:
@@ -77,14 +77,10 @@ export interface SearchProductsInput {
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
const DEFAULT_API_BASE_URL = 'http://localhost:3000';
|
||||
|
||||
// Use env var if set, otherwise use relative URL (works for SSR and client-side via same-origin)
|
||||
function apiBaseUrl(): string {
|
||||
return (
|
||||
process.env.API_BASE_URL ??
|
||||
process.env.NEXT_PUBLIC_API_BASE_URL ??
|
||||
DEFAULT_API_BASE_URL
|
||||
).replace(/\/$/, '');
|
||||
const base = process.env.API_BASE_URL ?? process.env.NEXT_PUBLIC_API_BASE_URL ?? '';
|
||||
return base.replace(/\/$/, '');
|
||||
}
|
||||
|
||||
function toQueryString(input: SearchProductsInput): string {
|
||||
|
||||
Reference in New Issue
Block a user