diff --git a/package-lock.json b/package-lock.json index 685017b..c4419fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40231,7 +40231,7 @@ "tslib": "^2.5.0", "typescript": "^4.9.5", "vite": "^4.1.1", - "vitest": "*" + "vitest": "^0.28.5" }, "dependencies": { "@fontsource/source-sans-pro": { diff --git a/packages/ui/src/lib/components/token-info.svelte b/packages/ui/src/lib/components/token-info.svelte new file mode 100644 index 0000000..0d060b3 --- /dev/null +++ b/packages/ui/src/lib/components/token-info.svelte @@ -0,0 +1,60 @@ + + +
+
{title}
+
{amount}
+
{tokenName}
+

{explanation}

+ +
+ + diff --git a/packages/ui/src/lib/stores/tokens.ts b/packages/ui/src/lib/stores/tokens.ts index 3e330a2..302c393 100644 --- a/packages/ui/src/lib/stores/tokens.ts +++ b/packages/ui/src/lib/stores/tokens.ts @@ -2,14 +2,15 @@ import { writable, type Writable } from 'svelte/store' export interface TokenData { go: number - rep: number + repTotal: number + repStaked: number loading: boolean } export type TokenStore = Writable function createTokenStore(): TokenStore { - const store = writable({ go: 30, rep: 0, loading: false }) + const store = writable({ go: 30, repTotal: 10, repStaked: 5, loading: false }) return store } diff --git a/packages/ui/src/routes/persona/[id]/post/new/+page.svelte b/packages/ui/src/routes/persona/[id]/post/new/+page.svelte index bce14b5..030879b 100644 --- a/packages/ui/src/routes/persona/[id]/post/new/+page.svelte +++ b/packages/ui/src/routes/persona/[id]/post/new/+page.svelte @@ -1,7 +1,5 @@ - +{#if state === 'price_varning'} + {#if $tokens.repTotal < TOKEN_POST_MIN_REP} + +
+
+
+ +
+

Sorry, you can't submit a post now

+

You need at least {TOKEN_POST_MIN_REP} REP to submit a post through this Persona.

+ +
+ +
+ +