Skip to content

Commit

Permalink
make route for become-a-provider
Browse files Browse the repository at this point in the history
Make EmailProviderRequest's Cancel be a link to /
  • Loading branch information
shannonwells committed Oct 30, 2024
1 parent 29acf75 commit c191272
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 25 deletions.
8 changes: 1 addition & 7 deletions src/components/BecomeAProvider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
import CreateMsa from './CreateMsa.svelte';
import CreateProvider from './CreateProvider.svelte';
import EmailProviderRequest from './EmailProviderRequest.svelte';
import { pageContent } from '$lib/stores/pageContentStore';
import { NetworkType } from '$lib/stores/networksStore';
// a callback for when the user cancels this action
export let cancelAction = () => {
pageContent.login();
};
</script>

<div id="become-a-provider" class="content-block column w-single-block">
Expand All @@ -34,7 +28,7 @@
<CreateProvider />
{/if}
{:else}
<button on:click|preventDefault={cancelAction} class="btn-no-fill text-left">Back</button>
<a href="/" class="btn-no-fill text-left">Back</a>
{/if}
</form>
</BlockSection>
Expand Down
7 changes: 1 addition & 6 deletions src/components/CreateMsa.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
import ActivityLogPreviewItem from './ActivityLogPreviewItem.svelte';
import { activityLog } from '$lib/stores/activityLogStore';
// a callback for when the user cancels this action
export let cancelAction = () => {
pageContent.login();
};
let recentActivityItem: Activity | undefined;
let recentTxnId: Activity['txnId'] | undefined;
let isInProgress = false;
Expand Down Expand Up @@ -66,7 +61,7 @@
Create an MSA
{/if}
</button>
<button on:click|preventDefault={cancelAction} class="btn-no-fill">Cancel</button>
<a href="/" class="btn-no-fill">Cancel</a>
</form>
</div>
{#if recentActivityItem}
Expand Down
6 changes: 1 addition & 5 deletions src/components/CreateProvider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
import { activityLog } from '$lib/stores/activityLogStore';
import ActivityLogPreviewItem from './ActivityLogPreviewItem.svelte';
// a callback for when the user cancels this action
export let cancelAction = () => {
pageContent.login();
};
// a callback for when a transaction hits a final state
let createProviderTxnFinished = async (succeeded: boolean) => {
if (succeeded) {
Expand Down Expand Up @@ -82,7 +78,7 @@
Create Provider
{/if}
</button>
<button on:click|preventDefault={cancelAction} class="btn-no-fill">Cancel</button>
<a href="/" class="btn-no-fill">Cancel</a>
</div>
</form>
{#if recentActivityItem}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmailProviderRequest.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
</p>
<form class="flex w-[350px] items-end justify-between">
<button id="email-request-btn" on:click|preventDefault={composeEmail} class="btn-primary">Email Request</button>
<button on:click|preventDefault={cancelAction} class="btn-no-fill">Cancel</button>
<a href="/" class="btn-no-fill">Cancel</a>
</form>
</div>
2 changes: 1 addition & 1 deletion src/components/ProviderLogin.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>Want to learn more about providers?
</a>
</div>
<Button id="request-2b-provider-btn" title="Become a Provider" action={pageContent.becomeProvider} />
<a href="/become-a-provider" id="request-2b-provider-btn" class="btn-primary">Become a Provider"</a>
</BlockSection>
<BlockSection title="Need tokens?">
<HowToTransact additionalStyles="text-sm" />
Expand Down
3 changes: 1 addition & 2 deletions src/components/RequestToBeProvider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
let localDotApi: DotApi = defaultDotApi;
let mailTo = createMailto('[email protected]', 'Request to be a Provider', '');
// a callback for when the user cancels this action
export let cancelAction = () => {};
dotApi.subscribe((api) => (localDotApi = api));
Expand Down Expand Up @@ -64,7 +63,7 @@
<button on:click|preventDefault={doProposeToBeProvider} id="request-2b-provider-btn" class="btn-primary">
Submit Request To Be Provider</button
>
<button on:click|preventDefault={cancelAction} class="btn-cancel">Cancel</button>
<a href="/" class="btn-cancel">Cancel</a>
</div>
</form>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

{#if $pageContent === PageContent.Dashboard}
<Dashboard />
{:else if $pageContent === PageContent.Login}
{:else}
<ProviderLogin />
{:else if $pageContent === PageContent.BecomeProvider}
<BecomeAProvider />
{/if}
5 changes: 5 additions & 0 deletions src/routes/become-a-provider/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script lang="ts">
import BecomeAProvider from '$components/BecomeAProvider.svelte';
</script>

<BecomeAProvider />

0 comments on commit c191272

Please sign in to comment.