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:
@@ -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>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user