Skip to content

Commit

Permalink
fix: add back button to funder flow, first step
Browse files Browse the repository at this point in the history
  • Loading branch information
evvvritt committed Sep 12, 2023
1 parent e4c2977 commit 529f916
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/lib/components/stepper/stepper.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import modal from '$lib/stores/modal';
import { browser } from '$app/environment';
const dispatch = createEventDispatcher<{ stepChange: never }>();
const dispatch = createEventDispatcher<{ stepChange: never; conclude: never }>();
export let steps: Steps;
export let context: (() => Writable<unknown>) | undefined = undefined;
Expand Down Expand Up @@ -198,6 +198,8 @@
disableTransitions = false;
} else {
modal.hide();
// dispatch in case Stepper is being used in a standalone page (like /funder-onboarding)
dispatch('conclude');
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
href={canSubmitProjectClaim
? buildUrl('/app/claim-project', { projectToAdd: claimProjectInput })
: undefined}
target="_blank"
><Button variant="primary" size="large" disabled={!canSubmitProjectClaim}
>Claim project</Button
></a
Expand Down Expand Up @@ -247,7 +246,7 @@
<div class="text">
<h3>Start your Drip List</h3>
<p>Give to a personalized list of GitHub projects or Ethereum addresses.</p>
<a href="/app/funder-onboarding" target="_blank">
<a href="/app/funder-onboarding">
<Button variant="primary" size="large">Create your Drip List</Button>
</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/routes/app/(flows)/funder-onboarding/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<Stepper
bind:currentStepIndex
on:stepChange={() => window.scrollTo({ top: 0 })}
on:conclude={() => window.history.back()}
context={() => state}
steps={steps()}
minHeightPx={512}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import type { State } from '../../funder-onboarding-flow';
import { page } from '$app/stores';
import DripListEditor from '$lib/components/drip-list-editor/drip-list-editor.svelte';
import ArrowLeft from 'radicle-design-system/icons/ArrowLeft.svelte';
const dispatch = createEventDispatcher<StepComponentEvents>();
Expand All @@ -28,6 +29,9 @@
showListFirst={true}
{projectUrlToAdd}
/>
<svelte:fragment slot="left-actions">
<Button icon={ArrowLeft} on:click={() => dispatch('conclude')}>Back</Button>
</svelte:fragment>
<svelte:fragment slot="actions">
<Button
disabled={!isValid}
Expand Down

0 comments on commit 529f916

Please sign in to comment.