fix: urlon parsing

This commit is contained in:
tresabhi committed 2024-11-08 10:38:18 -06:00
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);