mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-06 17:27:57 +00:00
fix hydration and browser navigation errors
This commit is contained in:
@@ -55,8 +55,8 @@ export function WebsocketApiTool() {
|
|||||||
const getInitialMethod = (): CommandMethod => {
|
const getInitialMethod = (): CommandMethod => {
|
||||||
for (const group of (commandList as CommandGroup[])) {
|
for (const group of (commandList as CommandGroup[])) {
|
||||||
for (const method of group.methods) {
|
for (const method of group.methods) {
|
||||||
if (slug.slice(1) === slugify(method.name) || params.req?.command == method.body.command) {
|
if (params.req?.command === method.body.command) {
|
||||||
return method;
|
return method
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,6 +74,19 @@ export function WebsocketApiTool() {
|
|||||||
);
|
);
|
||||||
streamPausedRef.current = streamPaused;
|
streamPausedRef.current = streamPaused;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (slug) {
|
||||||
|
for (const group of (commandList as CommandGroup[])) {
|
||||||
|
for (const method of group.methods) {
|
||||||
|
if (slug.slice(1) === slugify(method.name)) {
|
||||||
|
setMethod(method)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [slug])
|
||||||
|
|
||||||
const handleCurrentBodyChange = (value: any) => {
|
const handleCurrentBodyChange = (value: any) => {
|
||||||
setCurrentBody(value);
|
setCurrentBody(value);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user