From c0c2df9f5cf0714bbf54dd4c0fdd88c5057dbdfe Mon Sep 17 00:00:00 2001 From: UdayRajSahai2 Date: Wed, 11 Mar 2026 11:40:32 +0530 Subject: [PATCH 1/4] Added alternate background color and also aligned --- app/[locale]/(user)/components/Sectors.tsx | 4 ++-- app/[locale]/(user)/page.tsx | 6 +++++- package-lock.json | 13 +------------ styles/tokens/_variables.css | 2 ++ styles/tokens/tailwind/color.js | 1 + 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/app/[locale]/(user)/components/Sectors.tsx b/app/[locale]/(user)/components/Sectors.tsx index 06017121..73880765 100644 --- a/app/[locale]/(user)/components/Sectors.tsx +++ b/app/[locale]/(user)/components/Sectors.tsx @@ -32,7 +32,7 @@ const Sectors = () => { const router = useRouter(); return ( -
+
Explore Sectors @@ -41,7 +41,7 @@ const Sectors = () => { matters most to your domain.
-
+
- + { Preview - + {row.original.format === 'PDF' ? ( { className="mt-5 flex flex-col gap-6 border-1 border-solid border-greyExtralight bg-surfaceDefault p-4 lg:mx-0 lg:p-6" >
- - -
-
- {item.fileDetails?.format && ( - - )} - - {item.name} - -
-
- +
+
+ {item.fileDetails?.format && ( + + )} + + {item.name} + +
+
+ + - +
-
- -
- - - + + + + +
+
+ ) diff --git a/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/[id]/publish/page.tsx b/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/[id]/publish/page.tsx index 93c041c8..fe2123ff 100644 --- a/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/[id]/publish/page.tsx +++ b/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/[id]/publish/page.tsx @@ -209,7 +209,7 @@ export default function PublishPage() { setStatus('saved'); refetch(); router.push( - `/dashboard/${params.entityType}/${params.entitySlug}/aimodels` + `/dashboard/${params.entityType}/${params.entitySlug}/aimodels?tab=active` ); }, onError: (error: any) => { diff --git a/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/layout.tsx b/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/layout.tsx index 20464051..3c2a648a 100644 --- a/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/layout.tsx +++ b/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/edit/layout.tsx @@ -2,7 +2,12 @@ import { graphql } from '@/gql'; import { useMutation, useQuery } from '@tanstack/react-query'; -import { useParams, usePathname, useRouter } from 'next/navigation'; +import { + useParams, + usePathname, + useRouter, + useSearchParams, +} from 'next/navigation'; import { Tab, TabList, Tabs, toast } from 'opub-ui'; import { GraphQL } from '@/lib/api'; @@ -27,6 +32,8 @@ const FetchAIModelName: any = graphql(` aiModels(filters: $filters) { id displayName + status + isPublic } } `); @@ -34,6 +41,7 @@ const FetchAIModelName: any = graphql(` const TabsAndChildren = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); const pathName = usePathname(); + const searchParams = useSearchParams(); const params = useParams<{ entityType: string; entitySlug: string; @@ -91,6 +99,13 @@ const TabsAndChildren = ({ children }: { children: React.ReactNode }) => { } ); + const sourceTab = searchParams.get('tab'); + + const goBackURL = + sourceTab === 'active' + ? `/dashboard/${params.entityType}/${params.entitySlug}/aimodels?tab=active` + : `/dashboard/${params.entityType}/${params.entitySlug}/aimodels`; + const links = [ { label: 'Metadata', @@ -131,7 +146,7 @@ const TabsAndChildren = ({ children }: { children: React.ReactNode }) => { mutate({ displayName: e })} loading={editMutationLoading} status={titleBarStatus} diff --git a/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/page.tsx b/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/page.tsx index 118f1821..1c75e7b0 100644 --- a/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/page.tsx +++ b/app/[locale]/dashboard/[entityType]/[entitySlug]/aimodels/page.tsx @@ -184,7 +184,7 @@ export default function AIModelsPage({ {row.original.displayName}