Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion echo/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"react-markdown": "^9.1.0",
"react-pdf": "^9.2.1",
"react-qrcode-logo": "^3.0.0",
"react-router-dom": "^7.4.0",
"react-router": "^7.8.2",
"react-transition-group": "^4.4.5",
"recharts": "^2.15.1",
"rehype-stringify": "^10.0.1",
Expand Down
43 changes: 9 additions & 34 deletions echo/frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion echo/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "@mantine/dropzone/styles.css";

import { MantineProvider } from "@mantine/core";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { RouterProvider } from "react-router-dom";
import { RouterProvider } from "react-router/dom";
import { I18nProvider } from "./components/layout/I18nProvider";
import { mainRouter, participantRouter } from "./Router";
import { USE_PARTICIPANT_ROUTER } from "./config";
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Navigate, createBrowserRouter } from "react-router-dom";
import { Navigate, createBrowserRouter } from "react-router";
import {
createLazyRoute,
createLazyNamedRoute,
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/aspect/AspectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Trans } from "@lingui/react/macro";
import { cn, sanitizeImageUrl } from "@/lib/utils";
import { Box, Button, LoadingOverlay, Paper, Stack, Text } from "@mantine/core";
import { IconArrowsDiagonal } from "@tabler/icons-react";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { I18nLink } from "@/components/common/i18nLink";
import { useProjectById } from "@/components/project/hooks";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { directus } from "@/lib/directus";
import { readItem } from "@directus/sdk";
import useCopyToRichText from "@/hooks/useCopyToRichText";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";

interface Quote {
quote_id: {
Expand Down
4 changes: 2 additions & 2 deletions echo/frontend/src/components/aspect/hooks/useCopyQuote.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { directus } from "@/lib/directus";
import { readItem } from "@directus/sdk";
import useCopyToRichText from "@/hooks/useCopyToRichText";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { string } from "zod";

// Define types inline since the .d.ts file is not a module
Expand All @@ -20,7 +20,7 @@ type QuoteWithConversation = {
};

export const useCopyQuote = () => {
const { language, projectId } = useParams();
const { language, projectId } = useParams<{ language: string; projectId: string }>();
const { copied, copy } = useCopyToRichText();

// actually aspect Segment ID
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/auth/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { ADMIN_BASE_URL } from "@/config";
import { throwWithMessage } from "../utils/errorUtils";
import { useEffect, useState } from "react";
import { useLocation, useSearchParams } from "react-router-dom";
import { useLocation, useSearchParams } from "react-router";

export const useCurrentUser = () =>
useQuery({
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/chat/ChatAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
Center,
Loader,
} from "@mantine/core";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { IconDotsVertical, IconPencil, IconTrash } from "@tabler/icons-react";
import { formatRelative } from "date-fns";
import { NavigationButton } from "../common/NavigationButton";
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/chat/ChatHistoryMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { CopyRichTextIconButton } from "@/components/common/CopyRichTextIconButt
import { ConversationLinks } from "@/components/conversation/ConversationLinks";
import SourcesSearched from "./SourcesSearched";
import { I18nLink } from "@/components/common/i18nLink";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { IconInfoCircle } from "@tabler/icons-react";
import { Sources } from "./Sources";
import { ReferencesIconButton } from "../common/ReferencesIconButton";
Expand Down
1 change: 0 additions & 1 deletion echo/frontend/src/components/common/NavigationButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Tooltip,
} from "@mantine/core";
import { PropsWithChildren } from "react";
import { Link } from "react-router-dom";
import { I18nLink } from "@/components/common/i18nLink";
import { LoadingSpinner } from "./LoadingSpinner";

Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/common/i18nLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SUPPORTED_LANGUAGES } from "@/config";
import { useLanguage } from "@/hooks/useLanguage";
import React from "react";
import { Link, LinkProps, useParams } from "react-router-dom";
import { Link, LinkProps, useParams } from "react-router";

export const I18nLink: React.FC<LinkProps> = ({ to, ...props }) => {
const { language } = useParams<{ language?: string }>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Button,
Alert,
} from "@mantine/core";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import {
IconCheck,
IconLock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
useCallback,
Suspense,
} from "react";
import { useLocation, useParams } from "react-router-dom";
import { useLocation, useParams } from "react-router";
import { UploadConversationDropzone } from "../dropzone/UploadConversationDropzone";
import { useDebouncedValue } from "@mantine/hooks";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import { Button, Group, Stack } from "@mantine/core";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { IconDownload, IconTrash } from "@tabler/icons-react";
import { useDeleteConversationByIdMutation } from "./hooks";
import { useI18nNavigate } from "@/hooks/useI18nNavigate";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Anchor, Group } from "@mantine/core";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { I18nLink } from "@/components/common/i18nLink";

export const ConversationLinks = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useMoveConversationMutation } from "./hooks";
import { useInfiniteProjects } from "@/components/project/hooks";
import { Trans } from "@lingui/react/macro";
import { useI18nNavigate } from "@/hooks/useI18nNavigate";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";

export const MoveConversationButton = ({
conversation,
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/error/ErrorPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Button, Text, Title } from "@mantine/core";
import { useRouteError, isRouteErrorResponse } from "react-router-dom";
import { useRouteError, isRouteErrorResponse } from "react-router";
import { BaseLayout } from "../layout/BaseLayout";
import { DEBUG_MODE } from "@/config";

Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/insight/Insight.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Paper, Stack, Text } from "@mantine/core";
import { Link, useParams } from "react-router-dom";
import { Link, useParams } from "react-router";
import { I18nLink } from "@/components/common/i18nLink";

export const Insight = ({
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/language/LanguagePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SUPPORTED_LANGUAGES } from "@/config";
import { useLanguage } from "@/hooks/useLanguage";
import { NativeSelect } from "@mantine/core";
import { ChangeEvent } from "react";
import { useLocation } from "react-router-dom";
import { useLocation } from "react-router";

const data: Array<{
language: (typeof SUPPORTED_LANGUAGES)[number];
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/AuthLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Divider, LoadingOverlay } from "@mantine/core";
import { Footer } from "./Footer";
import { Header } from "./Header";
import { Outlet, useNavigate, useSearchParams } from "react-router-dom";
import { Outlet, useNavigate, useSearchParams } from "react-router";
import { PropsWithChildren, useEffect } from "react";
import { Toaster } from "../common/Toaster";
import { useAuthenticated } from "@/components/auth/hooks";
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/BaseLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from "@mantine/core";
import { Toaster } from "../common/Toaster";
import { Outlet } from "react-router-dom";
import { Outlet } from "react-router";
import { PropsWithChildren } from "react";
import { Header } from "./Header";
import { ErrorBoundary } from "../error/ErrorBoundary";
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { LanguagePicker } from "../language/LanguagePicker";
import { useState, useEffect } from "react";
import * as Sentry from "@sentry/react";
import { useLanguage } from "@/hooks/useLanguage";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { AnnouncementIcon } from "../announcement/AnnouncementIcon";
import { Announcements } from "../announcement/Announcements";
import { TopAnnouncementBar } from "../announcement/TopAnnouncementBar";
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/LanguageLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Outlet } from "react-router-dom";
import { Outlet } from "react-router";
import { I18nProvider } from "./I18nProvider";

export const LanguageLayout = () => {
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/ParticipantLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Outlet, useLocation } from "react-router-dom";
import { Outlet, useLocation } from "react-router";
import { Group, ActionIcon, Box } from "@mantine/core";
import useSessionStorageState from "use-session-storage-state";
import { IconSettings } from "@tabler/icons-react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { t } from "@lingui/core/macro";
import { Stack, Title } from "@mantine/core";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { TabsWithRouter } from "./TabsWithRouter";
import { ConversationStatusIndicators } from "../conversation/ConversationAccordion";
import { CONVERSATION_FIELDS_WITHOUT_PROCESSING_STATUS, useConversationById } from "../conversation/hooks";

export const ProjectConversationLayout = () => {
const { conversationId } = useParams();
const { conversationId } = useParams<{ conversationId: string }>();

const conversationQuery = useConversationById({
conversationId: conversationId ?? "",
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/ProjectLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionIcon, Box } from "@mantine/core";
import { Outlet } from "react-router-dom";
import { Outlet } from "react-router";
import { ProjectSidebar } from "../project/ProjectSidebar";
import { Resizable } from "re-resizable";
import { useSidebar } from "@/components/layout/hooks/useSidebar";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from "@lingui/core/macro";
import { useDocumentTitle } from "@mantine/hooks";
import { Outlet } from "react-router-dom";
import { Outlet } from "react-router";

export const ProjectLibraryLayout = () => {
useDocumentTitle(t`Project Library | Dembrane`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { t } from "@lingui/core/macro";
import { useProjectById } from "@/components/project/hooks";
import { Box, Divider, LoadingOverlay, Stack } from "@mantine/core";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { TabsWithRouter } from "./TabsWithRouter";
import { useDocumentTitle } from "@mantine/hooks";
import { ProjectQRCode } from "../project/ProjectQRCode";
Expand Down
2 changes: 1 addition & 1 deletion echo/frontend/src/components/layout/TabsWithRouter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Stack, Tabs, Box, LoadingOverlay } from "@mantine/core";
import { useEffect, useState, Suspense, useCallback } from "react";
import { Outlet, useLocation, useParams } from "react-router-dom";
import { Outlet, useLocation, useParams } from "react-router";
import { useI18nNavigate } from "@/hooks/useI18nNavigate";

const TabLoadingFallback = () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { IconMicrophone } from "@tabler/icons-react";
import { Modal } from "@mantine/core";
import Cookies from "js-cookie";
import { useDisclosure } from "@mantine/hooks";
import { useLocation } from "react-router-dom";
import { useLocation } from "react-router";

interface MicrophoneTestProps {
onContinue: (deviceId: string) => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Trans } from "@lingui/react/macro";
// Start of Selection
import React, { useEffect, useMemo, useState } from "react";
import { useSearchParams } from "react-router-dom";
import { useSearchParams } from "react-router";

import "./ParticipantOnboardingCards.css";
import { useLanguage } from "@/hooks/useLanguage";
Expand Down
Loading