mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: complete tankoepdia page
This commit is contained in:
1 parent
2b5ffb2b84
commit
a54ba78dbf
39 files changed
+790
-161
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { useStore } from '@nanostores/react';
|
||||
import { useLayoutEffect, useState } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { $patreonLogin } from '../stores/patreonLogin';
|
||||
|
||||
let cache: Record<string, boolean | Promise<boolean>> = {};
|
||||
@@ -8,7 +8,7 @@ export function useAdExempt() {
|
||||
const patreon = useStore($patreonLogin);
|
||||
const [exempt, setExempt] = useState(false);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
if (!patreon.token) return setExempt(false);
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useLayoutEffect, useState } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useFullscreenAvailability() {
|
||||
const [available, setAvailable] = useState(false);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
useEffect(() => {
|
||||
setAvailable(document.fullscreenEnabled);
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type RefObject, useLayoutEffect, useRef } from 'react';
|
||||
import { type RefObject, useEffect, useRef } from 'react';
|
||||
|
||||
interface UseIntersectionOptions extends IntersectionObserverInit {
|
||||
disabled: boolean;
|
||||
@@ -11,7 +11,7 @@ export function useIntersection(
|
||||
) {
|
||||
const observer = useRef<IntersectionObserver>();
|
||||
|
||||
useLayoutEffect(() => {
|
||||
useEffect(() => {
|
||||
if (options?.disabled || !ref.current) return;
|
||||
|
||||
const rect = ref.current.getBoundingClientRect();
|
||||
|
||||
Reference in new issue
Block a user