feat(preferences): no-subscription for non logged in users (#676)

* feat(preferences): no-subscription for non logged in users

* fix: check if user has account using application.hasAccount()
This commit is contained in:
Gorjan Petrovski
2021-10-11 17:29:41 +02:00
committed by GitHub
parent e0c6aab03d
commit 6f18664564
6 changed files with 18 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
import { FunctionalComponent } from "preact";
import { Text } from '@/preferences/components';
import { LinkButton, Text } from '@/preferences/components';
import { Button } from '@/components/Button';
import { WebApplication } from "@/ui_models/application";
import { useState } from "preact/hooks";
@@ -44,18 +44,19 @@ export const NoSubscription: FunctionalComponent<{
</Text>
)}
<div className="flex">
<Button
<LinkButton
className="min-w-20 mt-3 mr-3"
type="normal"
label="Refresh"
onClick={() => null}
/>
<Button
className="min-w-20 mt-3"
type="primary"
label="Purchase subscription"
onClick={onPurchaseClick}
label="Learn More"
link="https://standardnotes.com/plans"
/>
{application.hasAccount() &&
<Button
className="min-w-20 mt-3"
type="primary"
label="Subscribe"
onClick={onPurchaseClick}
/>
}
</div>
</>
);