Skip to content

Commit 9d6e453

Browse files
Fix: Horizontal clubs, mobile menu, and translator
1 parent ab70cd4 commit 9d6e453

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

src/components/Header/DesktopNav.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ const DesktopNav = () => {
3636

3737
const handleLanguageSelect = (lang: string) => {
3838
const url = window.location.href;
39-
// Try Google Translate first, fallback to DeepL
39+
// Try Google Translate (website translate), fallback to DeepL Website Translator
4040
try {
41-
window.open(`https://translate.google.com/translate?sl=auto&tl=${lang}&u=${encodeURIComponent(url)}`, '_blank');
41+
window.open(`https://translate.google.com/translate?sl=auto&tl=${lang}&u=${encodeURIComponent(url)}`, '_blank', 'noopener,noreferrer');
4242
} catch (error) {
43-
window.open(`https://www.deepl.com/translator#auto/${lang}/${encodeURIComponent(url)}`, '_blank');
43+
window.open(`https://www.deepl.com/translate?url=${encodeURIComponent(url)}&tl=${lang}&op=translate`, '_blank', 'noopener,noreferrer');
4444
}
4545
};
4646

src/components/Header/MobileNav.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ const MobileNav = ({ isMenuOpen, setIsMenuOpen }: MobileNavProps) => {
4343
const translatePage = (langCode: string) => {
4444
const currentUrl = window.location.href;
4545
const googleTranslateUrl = `https://translate.google.com/translate?sl=auto&tl=${langCode}&u=${encodeURIComponent(currentUrl)}`;
46-
4746
try {
48-
window.open(googleTranslateUrl, '_blank');
47+
window.open(googleTranslateUrl, '_blank', 'noopener,noreferrer');
4948
} catch (error) {
50-
const deeplUrl = `https://www.deepl.com/translator#en/${langCode}/${encodeURIComponent(currentUrl)}`;
51-
window.open(deeplUrl, '_blank');
49+
const deeplUrl = `https://www.deepl.com/translate?url=${encodeURIComponent(currentUrl)}&tl=${langCode}&op=translate`;
50+
window.open(deeplUrl, '_blank', 'noopener,noreferrer');
5251
}
5352
};
5453

@@ -189,7 +188,11 @@ const MobileNav = ({ isMenuOpen, setIsMenuOpen }: MobileNavProps) => {
189188
transition={{ delay: 0.6 }}
190189
className="pt-2"
191190
>
192-
<Button className="w-full bg-alien-green hover:bg-alien-green-light text-alien-space-dark rounded-lg py-2 flex items-center justify-center gap-2 font-nasalization transition-all duration-300 hover:scale-105">
191+
<Button
192+
className="w-full bg-alien-green hover:bg-alien-green-light text-alien-space-dark rounded-lg py-2 flex items-center justify-center gap-2 font-nasalization transition-all duration-300 hover:scale-105"
193+
onClick={() => window.open('https://aliendex.vercel.app', '_blank', 'noopener,noreferrer')}
194+
aria-label="Open AlienDex Portal"
195+
>
193196
<img
194197
src="/lovable-uploads/AW.png"
195198
alt="Wallet"

src/pages/Clubs.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,14 @@ const Clubs: React.FC = () => {
402402
<h2 className="text-3xl font-bold text-alien-gold mb-8 font-nasalization text-center text-glow">
403403
Featured Clubs
404404
</h2>
405-
<div className="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-8">
406-
{featuredClubs.map((club, index) => (
407-
<FeaturedClubCard key={index} club={club} />
408-
))}
405+
<div className="overflow-x-auto pb-2" aria-label="Featured clubs horizontal list">
406+
<div className="flex gap-6 snap-x snap-mandatory">
407+
{[...featuredClubs].sort((a, b) => a.name.localeCompare(b.name)).map((club, index) => (
408+
<div key={index} className="min-w-[320px] md:min-w-[520px] xl:min-w-[560px] snap-start">
409+
<FeaturedClubCard club={club} />
410+
</div>
411+
))}
412+
</div>
409413
</div>
410414
</div>
411415

0 commit comments

Comments
 (0)