feat(messageSources): use arrow functions

This commit is contained in:
ItzCrazyKns 2024-04-21 16:22:27 +05:30
parent 0ea2bec85d
commit ec91289c0c
No known key found for this signature in database
GPG Key ID: 8162927C7CCE3065
2 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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">