From 205d9c0ddf5e1e09ec2bafc545bb3507c6873751 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:38:18 -0600 Subject: [PATCH] fix: urlon parsing --- docs/changelogs/1.25.0.md | 4 +++- packages/website/src/components/Embeds/Import.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelogs/1.25.0.md b/docs/changelogs/1.25.0.md index e3c474310..1fe5d5f32 100644 --- a/docs/changelogs/1.25.0.md +++ b/docs/changelogs/1.25.0.md @@ -3,4 +3,6 @@ ## Features - Added embeds - - This tool is intended + - This tool is intended for streamers and content creators but feel free to generate embeds for personal use! + - There are tons of options and an infinite amount of possible customizations + - BlitzKit only offers 1 embed at the moment but feel free to suggest more diff --git a/packages/website/src/components/Embeds/Import.tsx b/packages/website/src/components/Embeds/Import.tsx index 819470b13..32ad5f769 100644 --- a/packages/website/src/components/Embeds/Import.tsx +++ b/packages/website/src/components/Embeds/Import.tsx @@ -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);