From 0c56fc35ffc0b30939cf99f061336f1e93cb155f Mon Sep 17 00:00:00 2001 From: vhande <78013271+vhande@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:24:48 +0100 Subject: [PATCH] Rename variant --- src/pages/search/index.page.tsx | 23 +++++++++++++++++++---- src/ui/Tabs.tsx | 10 +++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/pages/search/index.page.tsx b/src/pages/search/index.page.tsx index 433f3e2c2..ce24a95f4 100644 --- a/src/pages/search/index.page.tsx +++ b/src/pages/search/index.page.tsx @@ -1,6 +1,6 @@ import getConfig from 'next/config'; import { useRouter } from 'next/router'; -import { useEffect, useState } from 'react'; +import { useState } from 'react'; import { TabContent } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; @@ -12,7 +12,7 @@ import { useIsClient } from '@/hooks/useIsClient'; import { useLegacyPath } from '@/hooks/useLegacyPath'; import { Page } from '@/ui/Page'; import { Stack } from '@/ui/Stack'; -import { Tabs, TabsCustomVariants } from '@/ui/Tabs'; +import { Tabs, TabsVariants } from '@/ui/Tabs'; import { colors } from '@/ui/theme'; import { getApplicationServerSideProps } from '@/utils/getApplicationServerSideProps'; @@ -61,7 +61,7 @@ const Search = () => { activeKey={tab} onSelect={handleSelectTab} activeBackgroundColor={`${udbMainDarkBlue}`} - customVariant={TabsCustomVariants.OUTLINED} + variant={TabsVariants.OUTLINED} > { )} - {tab === 'organizers' &&
Hello
} + {tab === 'organizers' && ( + + + {isClientSide && ( + + )} + + + )}
)} diff --git a/src/ui/Tabs.tsx b/src/ui/Tabs.tsx index 4d67eebad..6078c0d05 100644 --- a/src/ui/Tabs.tsx +++ b/src/ui/Tabs.tsx @@ -14,22 +14,22 @@ import { colors, getValueFromTheme } from './theme'; const getValue = getValueFromTheme(`tabs`); -export const TabsCustomVariants = { +export const TabsVariants = { DEFAULT: 'default', OUTLINED: 'outlined', } as const; type Props = BoxProps & - TabsProps & { + Omit & { activeBackgroundColor?: string; - customVariant?: Values; + variant?: Values; }; const Tabs = ({ activeKey, onSelect, activeBackgroundColor = 'white', - customVariant = TabsCustomVariants.DEFAULT, + variant = TabsVariants.DEFAULT, children: rawChildren, className, ...props @@ -131,7 +131,7 @@ const Tabs = ({ {children}