Fix all biome linter errors (#541)

This commit is contained in:
Jared Palmer 2024-11-15 12:18:17 -05:00 committed by GitHub
parent f23c73f6a5
commit e5d654bf41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 317 additions and 275 deletions

View file

@ -1,6 +1,6 @@
'use client';
import { ChatRequestOptions, CreateMessage, Message } from 'ai';
import type { ChatRequestOptions, CreateMessage, Message } from 'ai';
import cx from 'classnames';
import {
AnimatePresence,
@ -8,9 +8,15 @@ import {
useMotionValue,
useTransform,
} from 'framer-motion';
import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
import {
type Dispatch,
type SetStateAction,
useEffect,
useRef,
useState,
} from 'react';
import { useOnClickOutside } from 'usehooks-ts';
import { nanoid } from 'nanoid';
import {
Tooltip,
TooltipContent,
@ -142,6 +148,8 @@ const Tool = ({
);
};
const randomArr = [...Array(6)].map((x) => nanoid(5));
const ReadingLevelSelector = ({
setSelectedTool,
append,
@ -182,9 +190,9 @@ const ReadingLevelSelector = ({
return (
<div className="relative flex flex-col justify-end items-center">
{[...Array(6)].map((_, index) => (
{randomArr.map((id) => (
<motion.div
key={`dot-${index}`}
key={id}
className="size-[40px] flex flex-row items-center justify-center"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
@ -336,7 +344,7 @@ export const Toolbar = ({
setMessages: Dispatch<SetStateAction<Message[]>>;
}) => {
const toolbarRef = useRef<HTMLDivElement>(null);
const timeoutRef = useRef<NodeJS.Timeout>();
const timeoutRef = useRef<ReturnType<typeof setTimeout>>();
const [selectedTool, setSelectedTool] = useState<string | null>(null);
const [isAnimating, setIsAnimating] = useState(false);