From 2a88e36a804ca944a220031b3dea1edf3bd92a15 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Wed, 27 Nov 2024 14:46:44 +0800 Subject: [PATCH] refactor: improve language select style --- src/components/LanguageSelector.astro | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/components/LanguageSelector.astro b/src/components/LanguageSelector.astro index 0712d8f..f31157d 100644 --- a/src/components/LanguageSelector.astro +++ b/src/components/LanguageSelector.astro @@ -13,10 +13,15 @@ const alternateLinks = Object.fromEntries( getLocaleUrl(Astro.url.pathname, locale), ]), ); +const selectedWidthCalcId = + "selected-width-calc-" + Math.random().toString(36).substring(7); const { class: className, ...rest } = Astro.props; --- - + +