mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
feat: patreon plug
This commit is contained in:
1 parent
0a0376312b
commit
14e45d97d2
11 files changed
+126
-61
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { use } from 'react';
|
||||
import { useApp } from '../stores/app';
|
||||
|
||||
export function useAdExempt() {
|
||||
@@ -5,7 +6,11 @@ export function useAdExempt() {
|
||||
|
||||
if (!patreon) return false;
|
||||
|
||||
fetch(`/api/patreon/membership/${patreon.token}`)
|
||||
.then((response) => response.json())
|
||||
.then(console.log);
|
||||
const json = use(
|
||||
fetch(`/api/patreon/membership/${patreon.token}`, {
|
||||
cache: 'force-cache',
|
||||
}).then((response) => response.json()),
|
||||
);
|
||||
|
||||
return typeof json === 'boolean' && json;
|
||||
}
|
||||
Reference in new issue
Block a user