Update a dependency

This commit is contained in:
Tony Giorgio
2023-06-10 22:43:31 -05:00
committed by Tony Giorgio
parent 0e02619f92
commit 44797dd9a0
2 changed files with 22 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { createResource, Show } from "solid-js";
import { createResource, Show, onMount } from "solid-js";
const relayUrls = [
"wss://nostr.zebedee.cloud",
@@ -33,6 +33,16 @@ const postsFetcher = async () => {
export function WaitlistAlreadyIn() {
const [posts] = createResource("", postsFetcher);
// Allow invite parameter to bypass waitlist
onMount(() => {
const urlParams = new URLSearchParams(window.location.search);
const invite = urlParams.get('invite');
if (invite === 'true') {
localStorage.setItem('already_approved', 'true');
window.location.href = "/";
}
});
return (
<main class="flex flex-col gap-4 sm:gap-4 py-8 px-4 max-w-xl mx-auto items-start drop-shadow-blue-glow">
<a href="https://mutinywallet.com">

View File

@@ -1,4 +1,4 @@
import { Match, Switch, createSignal } from "solid-js";
import { Match, Switch, createSignal, onMount } from "solid-js";
import { Button } from "~/components/layout";
import { StyledRadioGroup } from "../layout/Radio";
import { TextField } from "../layout/TextField";
@@ -37,6 +37,16 @@ export default function WaitlistForm() {
const [loading, setLoading] = createSignal(false);
// Allow invite parameter to bypass waitlist
onMount(() => {
const urlParams = new URLSearchParams(window.location.search);
const invite = urlParams.get('invite');
if (invite === 'true') {
localStorage.setItem('already_approved', 'true');
window.location.href = "/";
}
});
const newHandleSubmit: SubmitHandler<WaitlistForm> = async (
f: WaitlistForm
) => {