fix(web): align typed route links

This commit is contained in:
ogt
2026-06-26 19:08:56 +08:00
parent 0c43b74f4f
commit f3181feedd
4 changed files with 8 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
*/
import Link from 'next/link'
import type { Route as NextRoute } from 'next'
import { useTranslations } from 'next-intl'
import {
Activity,
@@ -39,7 +40,7 @@ export default function AutomationPage({ params }: { params: { locale: string }
{links.map(({ id, label, href, Icon }) => (
<Link
key={id}
href={href}
href={href as NextRoute}
className="group min-w-0 border border-[#e0ddd4] bg-[#faf9f3] p-4 text-[#141413] no-underline transition hover:border-[#d97757] hover:bg-[#fffaf7]"
>
<div className="flex items-center justify-between gap-3">

View File

@@ -9,6 +9,7 @@
import { useEffect, useMemo, useState, type ReactNode } from 'react'
import Link from 'next/link'
import type { Route as NextRoute } from 'next'
import { useTranslations } from 'next-intl'
import {
Activity,
@@ -781,7 +782,7 @@ export default function ObservabilityPage({ params }: { params: { locale: string
{drilldownLinks.map(({ id, label, href, Icon }) => (
<Link
key={id}
href={href}
href={href as NextRoute}
className="group min-w-0 border border-[#e0ddd4] bg-white p-4 text-[#141413] no-underline transition hover:border-[#d97757] hover:bg-[#fffaf7]"
>
<div className="flex items-center justify-between gap-3">

View File

@@ -9,6 +9,7 @@
*/
import Link from 'next/link'
import type { Route as NextRoute } from 'next'
import { useTranslations } from 'next-intl'
import {
BarChart3,
@@ -45,7 +46,7 @@ export default function OperationsPage({ params }: { params: { locale: string }
{links.map(({ id, label, href, Icon }) => (
<Link
key={id}
href={href}
href={href as NextRoute}
className="group min-w-0 border border-[#e0ddd4] bg-[#faf9f3] p-4 text-[#141413] no-underline transition hover:border-[#d97757] hover:bg-[#fffaf7]"
>
<div className="flex items-center justify-between gap-3">

View File

@@ -16,6 +16,7 @@
import React from 'react'
import Link from 'next/link'
import type { Route as NextRoute } from 'next'
import { useTranslations } from 'next-intl'
import { useState, useEffect } from 'react'
import { useIncidents } from '@/hooks/useIncidents'
@@ -2024,7 +2025,7 @@ export default function Home({ params }: { params: { locale: string } }) {
return (
<Link
key={section.id}
href={section.href}
href={section.href as NextRoute}
style={{
display: 'grid',
gap: 8,