mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 09:03:15 +00:00
Merge pull request #1829 from arc53/dependabot/npm_and_yarn/frontend/multi-d4a34be08c
build(deps): bump react and @types/react in /frontend
This commit is contained in:
@@ -14,10 +14,10 @@ interface ContextMenuProps {
|
||||
isOpen: boolean;
|
||||
setIsOpen: (isOpen: boolean) => void;
|
||||
options: MenuOption[];
|
||||
anchorRef: React.RefObject<HTMLElement>;
|
||||
className?: string;
|
||||
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
||||
anchorRef: React.RefObject<HTMLDivElement | null>;
|
||||
position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
||||
offset?: { x: number; y: number };
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function ContextMenu({
|
||||
|
||||
52
frontend/src/components/DocumentHead.tsx
Normal file
52
frontend/src/components/DocumentHead.tsx
Normal file
@@ -0,0 +1,52 @@
|
||||
import React from 'react';
|
||||
|
||||
interface DocumentHeadProps {
|
||||
title?: string;
|
||||
description?: string;
|
||||
keywords?: string;
|
||||
ogTitle?: string;
|
||||
ogDescription?: string;
|
||||
ogImage?: string;
|
||||
twitterCard?: string;
|
||||
twitterTitle?: string;
|
||||
twitterDescription?: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export function DocumentHead({
|
||||
title,
|
||||
description,
|
||||
keywords,
|
||||
ogTitle,
|
||||
ogDescription,
|
||||
ogImage,
|
||||
twitterCard,
|
||||
twitterTitle,
|
||||
twitterDescription,
|
||||
children,
|
||||
}: DocumentHeadProps) {
|
||||
return (
|
||||
<>
|
||||
{title && <title>{title}</title>}
|
||||
{description && <meta name="description" content={description} />}
|
||||
{keywords && <meta name="keywords" content={keywords} />}
|
||||
|
||||
{/* Open Graph */}
|
||||
{ogTitle && <meta property="og:title" content={ogTitle} />}
|
||||
{ogDescription && (
|
||||
<meta property="og:description" content={ogDescription} />
|
||||
)}
|
||||
{ogImage && <meta property="og:image" content={ogImage} />}
|
||||
|
||||
{/* Twitter */}
|
||||
{twitterCard && <meta name="twitter:card" content={twitterCard} />}
|
||||
{twitterTitle && <meta name="twitter:title" content={twitterTitle} />}
|
||||
{twitterDescription && (
|
||||
<meta name="twitter:description" content={twitterDescription} />
|
||||
)}
|
||||
|
||||
{/* Additional elements */}
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -7,12 +7,12 @@ type DropdownMenuProps = {
|
||||
onSelect: (value: string) => void;
|
||||
defaultValue?: string;
|
||||
icon?: string;
|
||||
isOpen?: boolean;
|
||||
onOpenChange?: (isOpen: boolean) => void;
|
||||
anchorRef?: React.RefObject<HTMLElement>;
|
||||
className?: string;
|
||||
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
||||
isOpen: boolean;
|
||||
onOpenChange: (isOpen: boolean) => void;
|
||||
anchorRef: React.RefObject<HTMLElement | null>;
|
||||
position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
||||
offset?: { x: number; y: number };
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export default function DropdownMenu({
|
||||
|
||||
@@ -17,7 +17,7 @@ export type OptionType = {
|
||||
type MultiSelectPopupProps = {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
anchorRef: React.RefObject<HTMLElement>;
|
||||
anchorRef: React.RefObject<HTMLElement | null>;
|
||||
options: OptionType[];
|
||||
selectedIds: Set<string | number>;
|
||||
onSelectionChange: (newSelectedIds: Set<string | number>) => void;
|
||||
|
||||
@@ -16,7 +16,7 @@ import { ActiveState } from '../models/misc';
|
||||
type SourcesPopupProps = {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
anchorRef: React.RefObject<HTMLButtonElement>;
|
||||
anchorRef: React.RefObject<HTMLButtonElement | null>;
|
||||
handlePostDocumentSelect: (doc: Doc | null) => void;
|
||||
setUploadModalState: React.Dispatch<React.SetStateAction<ActiveState>>;
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useDarkTheme } from '../hooks';
|
||||
interface ToolsPopupProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
anchorRef: React.RefObject<HTMLButtonElement>;
|
||||
anchorRef: React.RefObject<HTMLButtonElement | null>;
|
||||
}
|
||||
|
||||
export default function ToolsPopup({
|
||||
|
||||
Reference in New Issue
Block a user