Skip to content

Commit

Permalink
fix: read label from query param
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Nov 13, 2024
1 parent 42d53e7 commit 86363cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export function Home() {
const [params] = useSearchParams();

React.useEffect(() => {
const label = params.get("label") || params.get("name");
if (label) {
localStorage.setItem(localStorageKeys.label, label); // Save the label to local storage
}

// Load label from query parameter and save it to local storage
const nwcEncoded = params.get("nwc");
if (nwcEncoded) {
Expand Down

0 comments on commit 86363cf

Please sign in to comment.