Skip to content

Commit eec71da

Browse files
committed
revert ai slop
1 parent 6ba0f42 commit eec71da

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

src/components/FrameworkSelect.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,27 +149,13 @@ export function useCurrentFramework(frameworks: Framework[]) {
149149
queryClient.setQueryData(currentUserQueryOptions.queryKey, (user) =>
150150
user ? { ...user, lastUsedFramework: framework } : user,
151151
)
152-
const nextPathname = location.pathname.replace(
153-
/(\/docs\/framework\/)[^/]+/,
154-
`$1${framework}`,
155-
)
156-
if (nextPathname !== location.pathname) {
157-
const queryString = window.location.search
158-
const hash = window.location.hash
159-
navigate({ href: `${nextPathname}${queryString}${hash}` })
160-
}
152+
161153
// Update DB for logged-in users (fire-and-forget)
162154
if (userQuery.data) {
163155
persistFrameworkToServer(framework)
164156
}
165157
},
166-
[
167-
localCurrentFramework,
168-
location.pathname,
169-
navigate,
170-
queryClient,
171-
userQuery.data,
172-
],
158+
[localCurrentFramework, queryClient, userQuery.data],
173159
)
174160

175161
React.useEffect(() => {

0 commit comments

Comments
 (0)