From 32f4c6aaf0f1f6e27e17139801728662a5ab6d37 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sun, 20 Oct 2024 11:01:54 +0200 Subject: [PATCH] Update container name and stricter types for linking Signed-off-by: Martin Berg Alstad --- docker-compose.yml | 1 + src/utils/linking.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0bc9f80..5535c45 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,6 @@ services: web: + container_name: martials.no restart: always build: context: . diff --git a/src/utils/linking.ts b/src/utils/linking.ts index 3105a7a..183ffe0 100644 --- a/src/utils/linking.ts +++ b/src/utils/linking.ts @@ -3,18 +3,18 @@ import type { AbsolutePathname } from "@/types/types.ts" interface TranslatedPathnames { nb: AbsolutePathname - en: `/en${string}` + en: `/en${AbsolutePathname}` } export type NavLink = "/" | "/contact" | "/projects" | "/links" | "/hardware" -const paths: NavLink[] = [ +const paths: Set = new Set([ "/", "/contact", "/projects", "/links", "/hardware" -] +]) /** * Defines the localized pathnames for the site.