mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
fix: urlon parsing
This commit is contained in:
1 parent
2608d69ffe
commit
205d9c0ddf
2 files changed
+5
-2
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
Tooltip,
|
||||
} from '@radix-ui/themes';
|
||||
import { useRef, useState } from 'react';
|
||||
import { parse } from 'urlon';
|
||||
import { EmbedState } from '../../stores/embedState';
|
||||
|
||||
export function Import() {
|
||||
@@ -57,7 +58,7 @@ export function Import() {
|
||||
const url = new URL(importInput.current.value);
|
||||
const state = url.searchParams.get('state');
|
||||
if (state === null) throw undefined;
|
||||
const json = JSON.parse(state);
|
||||
const json = parse(state);
|
||||
|
||||
mutateEmbedState((draft) => {
|
||||
Object.assign(draft, json);
|
||||
|
||||
Reference in new issue
Block a user