Showing 8 of 8 total issues
File EncounterNotesTab.tsx
has 689 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { useInfiniteQuery, useMutation, useQuery, useQueryClient,
- Create a ticketCreate a ticket
Function EncounterNotesTab
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
export const EncounterNotesTab = ({ encounter }: EncounterTabProps) => { const { t } = useTranslation(); const queryClient = useQueryClient(); const [selectedThread, setSelectedThread] = useState<string | null>(null); const [isThreadsExpanded, setIsThreadsExpanded] = useState(false);
- Read upRead up
- Create a ticketCreate a ticket
Function MessageItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function MessageItem({ message, ...props}: React.ComponentProps<"div"> & { message: Message }) { const authUser = useAuthUser();
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
<div className="space-y-2"> <Input placeholder={t("encounter_notes__enter_discussion_title")} value={title} onChange={(e) => setTitle(e.target.value)}
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
{threadsData?.results.length === 0 ? ( <div className="text-center py-6"> <MessageSquarePlus className="size-8 text-primary mx-auto mb-3" /> <p className="text-sm text-gray-500"> {t("encounter_notes__no_discussions")}
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
{threadsData?.results.length === 0 ? ( <div className="text-center py-6"> <MessageSquarePlus className="size-8 text-primary mx-auto mb-3" /> <p className="text-sm text-gray-500"> {t("encounter_notes__no_discussions")}
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
{isFetchingNextPage ? ( <div className="py-2"> <div className="space-y-4"> <CardListSkeleton count={3} /> </div>
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
{messagesLoading ? ( <div className="flex-1 p-4"> <div className="space-y-4"> <CardListSkeleton count={4} /> </div>
- Read upRead up
- Create a ticketCreate a ticket