From c10b7c70a39e22511b8def0538e23581ff0f98c4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 04:22:59 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20LanguageSwi?= =?UTF-8?q?tcher=20accessibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced `` elements with semantic ` diff --git a/src/components/ui/GmapsButton.tsx b/src/components/ui/GmapsButton.tsx index 1d7f402..20ab367 100644 --- a/src/components/ui/GmapsButton.tsx +++ b/src/components/ui/GmapsButton.tsx @@ -3,8 +3,8 @@ import {Button} from "@/components/ui/button" import {useT} from "@/i18n/useT" interface Props { - latitude: Number - longitude: Number + latitude: number + longitude: number } export const GmapsButton: React.FC = ({latitude, longitude}) => { diff --git a/src/components/ui/LanguageSwitcher.tsx b/src/components/ui/LanguageSwitcher.tsx index c9e1b52..7627b99 100644 --- a/src/components/ui/LanguageSwitcher.tsx +++ b/src/components/ui/LanguageSwitcher.tsx @@ -8,9 +8,22 @@ export const LanguageSwitcher: React.FC = () => { } return ( -
- handleLanguageChange('en')}>EN / - handleLanguageChange('es')}>ES +
+ + +
) } diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 3c90a99..372790e 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -10,70 +10,37 @@ import { createFileRoute } from '@tanstack/react-router' -// Import Routes +import { Route as rootRouteImport } from './routes/__root' -import { Route as rootRoute } from './routes/__root' +const IndexLazyRouteImport = createFileRoute('/')() +const NetworkNetworkIdLazyRouteImport = createFileRoute('/network/$networkId')() -// Create Virtual Routes - -const IndexLazyImport = createFileRoute('/')() -const NetworkNetworkIdLazyImport = createFileRoute('/network/$networkId')() - -// Create/Update Routes - -const IndexLazyRoute = IndexLazyImport.update({ +const IndexLazyRoute = IndexLazyRouteImport.update({ id: '/', path: '/', - getParentRoute: () => rootRoute, + getParentRoute: () => rootRouteImport, } as any).lazy(() => import('./routes/index.lazy').then((d) => d.Route)) - -const NetworkNetworkIdLazyRoute = NetworkNetworkIdLazyImport.update({ +const NetworkNetworkIdLazyRoute = NetworkNetworkIdLazyRouteImport.update({ id: '/network/$networkId', path: '/network/$networkId', - getParentRoute: () => rootRoute, + getParentRoute: () => rootRouteImport, } as any).lazy(() => import('./routes/network/$networkId.lazy').then((d) => d.Route), ) -// Populate the FileRoutesByPath interface - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexLazyImport - parentRoute: typeof rootRoute - } - '/network/$networkId': { - id: '/network/$networkId' - path: '/network/$networkId' - fullPath: '/network/$networkId' - preLoaderRoute: typeof NetworkNetworkIdLazyImport - parentRoute: typeof rootRoute - } - } -} - -// Create and export the route tree - export interface FileRoutesByFullPath { '/': typeof IndexLazyRoute '/network/$networkId': typeof NetworkNetworkIdLazyRoute } - export interface FileRoutesByTo { '/': typeof IndexLazyRoute '/network/$networkId': typeof NetworkNetworkIdLazyRoute } - export interface FileRoutesById { - __root__: typeof rootRoute + __root__: typeof rootRouteImport '/': typeof IndexLazyRoute '/network/$networkId': typeof NetworkNetworkIdLazyRoute } - export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath fullPaths: '/' | '/network/$networkId' @@ -82,37 +49,34 @@ export interface FileRouteTypes { id: '__root__' | '/' | '/network/$networkId' fileRoutesById: FileRoutesById } - export interface RootRouteChildren { IndexLazyRoute: typeof IndexLazyRoute NetworkNetworkIdLazyRoute: typeof NetworkNetworkIdLazyRoute } +declare module '@tanstack/react-router' { + interface FileRoutesByPath { + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexLazyRouteImport + parentRoute: typeof rootRouteImport + } + '/network/$networkId': { + id: '/network/$networkId' + path: '/network/$networkId' + fullPath: '/network/$networkId' + preLoaderRoute: typeof NetworkNetworkIdLazyRouteImport + parentRoute: typeof rootRouteImport + } + } +} + const rootRouteChildren: RootRouteChildren = { IndexLazyRoute: IndexLazyRoute, NetworkNetworkIdLazyRoute: NetworkNetworkIdLazyRoute, } - -export const routeTree = rootRoute +export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() - -/* ROUTE_MANIFEST_START -{ - "routes": { - "__root__": { - "filePath": "__root.tsx", - "children": [ - "/", - "/network/$networkId" - ] - }, - "/": { - "filePath": "index.lazy.tsx" - }, - "/network/$networkId": { - "filePath": "network/$networkId.lazy.tsx" - } - } -} -ROUTE_MANIFEST_END */