Skip to content

Commit 736eb6a

Browse files
committed
revert setVersion
1 parent 440419a commit 736eb6a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/components/DocsLayout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const useLocalCurrentFramework = create<{
5757
*/
5858
function useCurrentFramework(frameworks: Framework[]) {
5959
const navigate = useNavigate()
60+
6061
const { framework: paramsFramework } = useParams({
6162
strict: false,
6263
})
@@ -146,13 +147,14 @@ function useCurrentVersion(versions: string[]) {
146147
(version: string) => {
147148
navigate({
148149
to: '.',
149-
params: (prev) => ({
150+
params: (prev: Record<string, string>) => ({
150151
...prev,
151152
version,
152-
})})
153+
}),
154+
})
153155
localCurrentVersion.setCurrentVersion(version)
154156
},
155-
[localCurrentVersion, navigate, libraryId]
157+
[localCurrentVersion, navigate]
156158
)
157159

158160
React.useEffect(() => {

0 commit comments

Comments
 (0)