Skip to content

Commit f32d0c6

Browse files
committed
refactor: import serverApiUrl directly from @openmapx/core/server
Drop the @/lib/env re-export and update the two callers (apps/web/src/app/admin/layout.tsx and (legal)/terms/page.tsx) to import serverApiUrl from @openmapx/core/server alongside the other core/server symbols they already pull in.
1 parent 5bd6793 commit f32d0c6

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

apps/web/src/app/(legal)/terms/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import type { LoadedIntegrationMeta } from "@openmapx/core";
2-
import { fetchCapabilities, fetchIntegrations, sectionSlug } from "@openmapx/core/server";
2+
import {
3+
fetchCapabilities,
4+
fetchIntegrations,
5+
sectionSlug,
6+
serverApiUrl,
7+
} from "@openmapx/core/server";
38
import type { Metadata } from "next";
49
import { getLocale, getTranslations } from "next-intl/server";
510
import { LegalPageShell, type LegalSection } from "@/components/legal/LegalPageShell";
6-
import { serverApiUrl } from "@/lib/env";
711

812
const sectionsEn: LegalSection[] = [
913
{ id: sectionSlug("1. Scope and Provider"), label: "Scope and Provider" },

apps/web/src/app/admin/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { serverApiUrl } from "@openmapx/core/server";
12
import { cookies } from "next/headers";
23
import { redirect } from "next/navigation";
34
import type { ReactNode } from "react";
45
import { AdminLayout } from "@/components/admin/AdminLayout";
5-
import { serverApiUrl } from "@/lib/env";
66

77
async function getAdminSession() {
88
const cookieStore = await cookies();

apps/web/src/lib/env.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,3 @@ export function buildClientEnv(): ClientEnv {
6161
: "/api/tiles/terrain/{z}/{x}/{y}.png"),
6262
};
6363
}
64-
65-
// Re-export so existing `@/lib/env` imports keep working; canonical
66-
// implementation lives in @openmapx/core/server.
67-
export { serverApiUrl } from "@openmapx/core/server";

0 commit comments

Comments
 (0)