feat(messageSources): use arrow functions
This commit is contained in:
parent
0ea2bec85d
commit
ec91289c0c
|
@ -90,7 +90,7 @@ For setups without Docker:
|
||||||
## Upcoming Features
|
## Upcoming Features
|
||||||
|
|
||||||
- [ ] Finalizing Copilot Mode
|
- [ ] Finalizing Copilot Mode
|
||||||
- [X] Adding support for local LLMs
|
- [x] Adding support for local LLMs
|
||||||
- [ ] Adding Discover and History Saving features
|
- [ ] Adding Discover and History Saving features
|
||||||
- [x] Introducing various Focus Modes
|
- [x] Introducing various Focus Modes
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,20 @@
|
||||||
/* eslint-disable @next/next/no-img-element */
|
/* eslint-disable @next/next/no-img-element */
|
||||||
import { cn } from '@/lib/utils';
|
|
||||||
import { Dialog, Transition } from '@headlessui/react';
|
import { Dialog, Transition } from '@headlessui/react';
|
||||||
import { Document } from '@langchain/core/documents';
|
import { Document } from '@langchain/core/documents';
|
||||||
import Link from 'next/link';
|
|
||||||
import { Fragment, useState } from 'react';
|
import { Fragment, useState } from 'react';
|
||||||
|
|
||||||
const MessageSources = ({ sources }: { sources: Document[] }) => {
|
const MessageSources = ({ sources }: { sources: Document[] }) => {
|
||||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||||
function closeModal() {
|
|
||||||
|
const closeModal = () => {
|
||||||
setIsDialogOpen(false);
|
setIsDialogOpen(false);
|
||||||
document.body.classList.remove('overflow-hidden-scrollable');
|
document.body.classList.remove('overflow-hidden-scrollable');
|
||||||
}
|
};
|
||||||
|
|
||||||
function openModal() {
|
const openModal = () => {
|
||||||
setIsDialogOpen(true);
|
setIsDialogOpen(true);
|
||||||
document.body.classList.add('overflow-hidden-scrollable');
|
document.body.classList.add('overflow-hidden-scrollable');
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-2">
|
<div className="grid grid-cols-2 lg:grid-cols-4 gap-2">
|
||||||
|
|
Loading…
Reference in New Issue