Skip to content

Commit

Permalink
refactor(frontend): gather steps enums
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Oct 26, 2023
1 parent ba4620a commit 377da33
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import type { Info } from '$declarations/airdrop/airdrop.did';
import { AirdropStep } from '$lib/enums/airdrop';
import type { StaticStep } from '$lib/types/steps';
import { countAirdropInvitesRedeemed } from '$lib/utils/airdrop.utils';
import StaticSteps from "$lib/components/ui/StaticSteps.svelte";
import {AirdropStep} from "$lib/enums/steps";
export let airdrop: Info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import InProgress from '$lib/components/ui/InProgress.svelte';
import AirdropInvites from '$lib/components/airdrop/AirdropInvites.svelte';
import type { Info } from '$declarations/airdrop/airdrop.did';
import { AirdropStep } from '$lib/enums/airdrop';
import type { StaticStep } from '$lib/types/steps';
import { fromNullable } from '@dfinity/utils';
import {
allAirdropInvitesRedeemed,
hasAirdropInvites,
isAirdropTransferred
} from '$lib/utils/airdrop.utils';
import {AirdropStep} from "$lib/enums/steps";
export let airdrop: Info;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/lib/components/core/Loader.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import type { ProgressStep } from '@dfinity/gix-components';
import { LoaderStep } from '$lib/enums/loader';
import InProgress from '$lib/components/ui/InProgress.svelte';
import { onMount } from 'svelte';
import { loadAddress } from '$lib/services/address.services';
Expand All @@ -19,6 +18,7 @@
import { tokenId } from '$lib/derived/token.derived';
import { AIRDROP } from '$lib/constants/airdrop.constants';
import {loading} from "$lib/stores/loader.store";
import {LoaderStep} from "$lib/enums/steps";
let progressStep: string = LoaderStep.ETH_ADDRESS;
Expand Down
6 changes: 0 additions & 6 deletions src/frontend/src/lib/enums/airdrop.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/frontend/src/lib/enums/loader.ts

This file was deleted.

14 changes: 14 additions & 0 deletions src/frontend/src/lib/enums/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@ export enum SignStep {
APPROVE = 'approve',
DONE = 'done'
}

export enum AirdropStep {
INITIALIZATION = 'initialization',
AIRDROP = 'airdrop',
INVITE_FRIENDS = 'invite_friends',
DONE = 'done'
}

export enum LoaderStep {
INITIALIZATION = 'initialization',
ETH_ADDRESS = 'eth_address',
ETH_DATA = 'eth_data',
DONE = 'done'
}

0 comments on commit 377da33

Please sign in to comment.