Use next Link instead of raw a html tags to wrap more links on web app

This commit is contained in:
Debanjum 2026-03-25 20:07:43 +05:30
parent f7bce48934
commit d4df9a73ec
2 changed files with 9 additions and 7 deletions

View file

@ -1,6 +1,7 @@
import styles from "./agentCard.module.css";
import { useEffect, useRef, useState } from "react";
import Link from "next/link";
import { UserProfile, ModelOptions, UserConfig } from "@/app/common/auth";
import { Button } from "@/components/ui/button";
@ -705,7 +706,7 @@ export function AgentModificationForm(props: AgentModificationFormProps) {
</AlertDialogHeader>
<AlertDialogDescription>
You need to be a Futurist subscriber to create more agents.{" "}
<a href="/settings">Upgrade now</a>.
<Link href="/settings">Upgrade now</Link>.
</AlertDialogDescription>
<AlertDialogFooter>
<AlertDialogCancel
@ -767,7 +768,7 @@ export function AgentModificationForm(props: AgentModificationFormProps) {
<FormDescription>
{!props.isSubscribed ? (
<p className="text-secondary-foreground">
Upgrade to the <a href="/settings">Futurist plan</a> to
Upgrade to the <Link href="/settings">Futurist plan</Link> to
access all models.
</p>
) : (
@ -971,7 +972,7 @@ export function AgentModificationForm(props: AgentModificationFormProps) {
<FormLabel>Knowledge Base</FormLabel>
<FormDescription>
Which information should be part of its digital brain?{" "}
<a href="/settings">Manage data</a>.
<Link href="/settings">Manage data</Link>.
</FormDescription>
<Collapsible>
<CollapsibleTrigger className="flex items-center justify-between text-sm gap-2 bg-muted p-2 rounded-lg">

View file

@ -27,6 +27,7 @@ import { UserPlusIcon } from "lucide-react";
import { useAuthenticatedData, UserProfile } from "@/app/common/auth";
import LoginPrompt from "../loginPrompt/loginPrompt";
import { usePathname } from "next/navigation";
import Link from "next/link";
async function openChat(userData: UserProfile | null | undefined) {
const unauthenticatedRedirectUrl = `/login?redirect=${encodeURIComponent(window.location.pathname)}`;
@ -112,15 +113,15 @@ export function AppSidebar(props: AppSidebarProps) {
<SidebarMenuItem className="p-0 m-0">
{open ? (
<SidebarMenuButton>
<a className="p-0 no-underline" href="/">
<Link className="p-0 no-underline" href="/">
<KhojLogoType className="h-auto w-16" />
</a>
</Link>
</SidebarMenuButton>
) : (
<SidebarMenuButton asChild>
<a className="flex items-center gap-2 no-underline" href="/">
<Link className="flex items-center gap-2 no-underline" href="/">
<KhojLogo className="w-14 h-auto" />
</a>
</Link>
</SidebarMenuButton>
)}
</SidebarMenuItem>