fix: lint workflow (#1167)

This commit is contained in:
josh 2025-09-08 21:02:06 +01:00 committed by GitHub
parent 256b4e0b89
commit 431eb919b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 28 additions and 22 deletions

View file

@ -5,7 +5,7 @@ import { cn } from '@/lib/utils';
import type { UIMessage } from 'ai';
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
import type { ComponentProps, HTMLAttributes, ReactElement } from 'react';
import { createContext, useContext, useEffect, useState } from 'react';
import { createContext, useContext, useEffect, useState, useMemo } from 'react';
type BranchContextType = {
currentBranch: number;
@ -82,7 +82,10 @@ export type BranchMessagesProps = HTMLAttributes<HTMLDivElement>;
export const BranchMessages = ({ children, ...props }: BranchMessagesProps) => {
const { currentBranch, setBranches, branches } = useBranch();
const childrenArray = Array.isArray(children) ? children : [children];
const childrenArray = useMemo(() =>
Array.isArray(children) ? children : [children],
[children]
);
// Use useEffect to update branches when they change
useEffect(() => {

View file

@ -12,6 +12,7 @@ export const Image = ({
mediaType,
...props
}: ImageProps) => (
// eslint-disable-next-line @next/next/no-img-element
<img
{...props}
alt={props.alt}

View file

@ -52,7 +52,7 @@ export const MessageAvatar = ({
...props
}: MessageAvatarProps) => (
<Avatar className={cn('size-8 ring-1 ring-border', className)} {...props}>
<AvatarImage alt="" className="mt-0 mb-0" src={src} />
<AvatarImage alt="" className="my-0" src={src} />
<AvatarFallback>{name?.slice(0, 2) || 'ME'}</AvatarFallback>
</Avatar>
);

View file

@ -32,7 +32,7 @@ export const SourcesTrigger = ({
{children ?? (
<>
<p className="font-medium">Used {count} sources</p>
<ChevronDownIcon className="h-4 w-4" />
<ChevronDownIcon className="size-4" />
</>
)}
</CollapsibleTrigger>
@ -66,7 +66,7 @@ export const Source = ({ href, title, children, ...props }: SourceProps) => (
>
{children ?? (
<>
<BookIcon className="h-4 w-4" />
<BookIcon className="size-4" />
<span className="block font-medium">{title}</span>
</>
)}

View file

@ -107,7 +107,7 @@ export const WebPreviewNavigationButton = ({
<Tooltip>
<TooltipTrigger asChild>
<Button
className="h-8 w-8 p-0 hover:text-foreground"
className="size-8 p-0 hover:text-foreground"
disabled={disabled}
onClick={onClick}
size="sm"