Fix duplicated variable (#23)

* fix video url

* update deploy script for using rsync

* remove delete from script

* translate resources page

* fix images dimensions and favicon

* add css optimization plugin and improve images

* update project dependencies

* refactor lang

* post translated to spanish

* fix metadata

* update dependencies

* update dependencies

* update dependencies

* update to Astro 5.x

* format index.astro

* Migrate content layer to Astro V5

* Fix duplicated variable
This commit is contained in:
Juan Manzanero 2025-02-01 17:35:49 -06:00 committed by GitHub
parent 4f0e80b988
commit 60bb38130b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,8 +2,6 @@ import { ui, defaultLang, showDefaultLang } from '@/i18n/ui';
export type lang = 'en' | 'es'; export type lang = 'en' | 'es';
export type lang = "en" | "es";
export function getLangFromUrl(url: URL) { export function getLangFromUrl(url: URL) {
const [, lang] = url.pathname.split('/'); const [, lang] = url.pathname.split('/');
if (lang in ui) return lang as keyof typeof ui; if (lang in ui) return lang as keyof typeof ui;