This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor: use window.history instead of reouter.replace for semble tabs

+2 -3
+2 -3
src/webapp/features/semble/components/sembleTabs/SembleTabs.tsx
··· 1 1 'use client'; 2 2 3 3 import { useState, Suspense } from 'react'; 4 - import { useRouter, useSearchParams } from 'next/navigation'; 4 + import { useSearchParams } from 'next/navigation'; 5 5 import { 6 6 Box, 7 7 Container, ··· 59 59 60 60 export default function SembleTabs(props: Props) { 61 61 const searchParams = useSearchParams(); 62 - const router = useRouter(); 63 62 const tabParam = searchParams.get('sembleTab') as TabValue; 64 63 const [activeTab, setActiveTab] = useState<TabValue>( 65 64 VALID_TABS.includes(tabParam) ? tabParam : 'similar', ··· 81 80 setActiveTab(newTab); 82 81 const viaCardId = searchParams.get('viaCardId'); 83 82 const qs = `id=${props.url}&sembleTab=${newTab}${viaCardId ? `&viaCardId=${viaCardId}` : ''}`; 84 - router.replace(`?${qs}`, { scroll: false }); 83 + window.history.replaceState(null, '', `?${qs}`); 85 84 }} 86 85 > 87 86 <Box