mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-12 20:26:10 +01:00
feat: remove patreon
This commit is contained in:
1 parent
da8025a0ad
commit
0df58d2d2c
13 files changed
+21
-326
No files matched your search
@@ -1,9 +1,7 @@
|
||||
import { assertSecret, patreonLoginUrl } from '@blitzkit/core';
|
||||
import { assertSecret } from '@blitzkit/core';
|
||||
import { ArrowRightIcon } from '@radix-ui/react-icons';
|
||||
import { Button, Code, Flex, Link, Separator, Text } from '@radix-ui/themes';
|
||||
import { useAdExempt } from '../hooks/useAdExempt';
|
||||
import { Button, Code, Flex, Link, Text } from '@radix-ui/themes';
|
||||
import { App } from '../stores/app';
|
||||
import { PatreonIcon } from './PatreonIcon';
|
||||
|
||||
export function Plugs() {
|
||||
return (
|
||||
@@ -14,9 +12,6 @@ export function Plugs() {
|
||||
}
|
||||
|
||||
function Content() {
|
||||
const exempt = useAdExempt();
|
||||
const hasPatreon = App.use((state) => state.logins.patreon !== undefined);
|
||||
|
||||
return (
|
||||
<Flex
|
||||
align="center"
|
||||
@@ -28,50 +23,22 @@ function Content() {
|
||||
>
|
||||
{assertSecret(import.meta.env.PUBLIC_PROMOTE_OPENTEST) === 'true' &&
|
||||
assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH) !== 'opentest' && (
|
||||
<>
|
||||
<Flex direction="column" gap="3" align="center">
|
||||
<Text size="5">
|
||||
BlitzKit{' '}
|
||||
<Code variant="outline" size="4" color="gray" highContrast>
|
||||
opentest
|
||||
</Code>{' '}
|
||||
is available now{' '}
|
||||
</Text>
|
||||
<Flex direction="column" gap="3" align="center">
|
||||
<Text size="5">
|
||||
BlitzKit{' '}
|
||||
<Code variant="outline" size="4" color="gray" highContrast>
|
||||
opentest
|
||||
</Code>{' '}
|
||||
is available now{' '}
|
||||
</Text>
|
||||
|
||||
<Link href="https://opentest.blitzkit.app/" target="_blank">
|
||||
<Button color="green">
|
||||
BlitzKit opentest <ArrowRightIcon />
|
||||
</Button>
|
||||
</Link>
|
||||
</Flex>
|
||||
|
||||
<Separator size="3" />
|
||||
</>
|
||||
)}
|
||||
|
||||
<Flex direction="column" gap="3" align="center">
|
||||
<Flex gap="1" align="center">
|
||||
<Text size="4" align="center">
|
||||
{exempt
|
||||
? 'You are supporting BlitzKit, thank you!'
|
||||
: 'Active Patreon supports go ad-free'}
|
||||
</Text>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="2" wrap="wrap" justify="center">
|
||||
<Link href="https://www.patreon.com/tresabhi" target="_blank">
|
||||
<Button>
|
||||
<PatreonIcon width={15} height={15} />{' '}
|
||||
{exempt ? 'Manage membership' : 'Support on Patreon'}
|
||||
</Button>
|
||||
</Link>
|
||||
{!hasPatreon && !exempt && (
|
||||
<Link href={patreonLoginUrl()}>
|
||||
<Button variant="outline">Log in with Patreon</Button>
|
||||
<Link href="https://opentest.blitzkit.app/" target="_blank">
|
||||
<Button color="green">
|
||||
BlitzKit opentest <ArrowRightIcon />
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
)}
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user