feat: complete tankoepdia page

This commit is contained in:
TrèsAbhi committed 2024-09-22 22:04:03 -05:00
1 parent 2b5ffb2b84
commit a54ba78dbf
39 files changed
+790 -161

No files matched your search

+2 -2
View File
@@ -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();