Fix Next.js type errors
This commit is contained in:
parent
1bd628dd47
commit
9213c3117e
@ -4,7 +4,7 @@ import Modal from '@/components/Modal';
|
||||
import { TbPhotoShare } from 'react-icons/tb';
|
||||
import { clsx } from 'clsx/lite';
|
||||
import { BiCopy } from 'react-icons/bi';
|
||||
import { ReactNode } from 'react';
|
||||
import { JSX, ReactNode } from 'react';
|
||||
import { shortenUrl } from '@/utility/url';
|
||||
import { toastSuccess } from '@/toast';
|
||||
import { PiXLogo } from 'react-icons/pi';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { clsx } from 'clsx/lite';
|
||||
import { RefObject } from 'react';
|
||||
import { JSX, RefObject } from 'react';
|
||||
|
||||
/*
|
||||
MAX WIDTHS
|
||||
@ -19,7 +19,7 @@ export default function SiteGrid({
|
||||
sideFirstOnMobile,
|
||||
sideHiddenOnMobile,
|
||||
}: {
|
||||
containerRef?: RefObject<HTMLDivElement>
|
||||
containerRef?: RefObject<HTMLDivElement | null>
|
||||
className?: string
|
||||
contentMain: JSX.Element
|
||||
contentSide?: JSX.Element
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import Link from 'next/link';
|
||||
import { clsx } from 'clsx/lite';
|
||||
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||
import { JSX } from 'react';
|
||||
|
||||
export default function SwitcherItem({
|
||||
icon,
|
||||
|
||||
@ -10,6 +10,7 @@ import { TAG_HIDDEN } from '@/tag';
|
||||
import HiddenHeader from '@/tag/HiddenHeader';
|
||||
import FocalLengthHeader from '@/focal/FocalLengthHeader';
|
||||
import PhotoHeader from './PhotoHeader';
|
||||
import { JSX } from 'react';
|
||||
|
||||
export default function PhotoDetailPage({
|
||||
photo,
|
||||
|
||||
@ -7,6 +7,7 @@ import AnimateItems from '@/components/AnimateItems';
|
||||
import { GRID_ASPECT_RATIO } from '@/site/config';
|
||||
import { useAppState } from '@/state/AppState';
|
||||
import SelectTileOverlay from '@/components/SelectTileOverlay';
|
||||
import { JSX } from 'react';
|
||||
|
||||
export default function PhotoGrid({
|
||||
photos,
|
||||
|
||||
@ -5,7 +5,7 @@ import PhotoGrid from './PhotoGrid';
|
||||
import PhotoGridInfinite from './PhotoGridInfinite';
|
||||
import { clsx } from 'clsx/lite';
|
||||
import AnimateItems from '@/components/AnimateItems';
|
||||
import { ComponentProps, useCallback, useState } from 'react';
|
||||
import { JSX, ComponentProps, useCallback, useState } from 'react';
|
||||
|
||||
export default function PhotoGridContainer({
|
||||
cacheKey,
|
||||
|
||||
@ -5,7 +5,7 @@ import { cwd } from 'process';
|
||||
const FONT_FAMILY_IBM_PLEX_MONO = 'IBMPlexMono';
|
||||
|
||||
const getFontData = async () => {
|
||||
let data: ArrayBuffer;
|
||||
let data;
|
||||
if (typeof fs !== 'undefined') {
|
||||
data = fs.readFileSync(path.join(
|
||||
cwd(),
|
||||
|
||||
@ -4,8 +4,8 @@ import { usePathname } from 'next/navigation';
|
||||
const usePathnames = () => {
|
||||
const pathname = usePathname();
|
||||
|
||||
const currentRef = useRef<string>();
|
||||
const previousRef = useRef<string>();
|
||||
const currentRef = useRef('');
|
||||
const previousRef = useRef('');
|
||||
|
||||
useEffect(() => {
|
||||
previousRef.current = currentRef.current;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user