mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
feat: support search-style-url
fix: url can be null in conversationId and query fix: get conversation api should handle not found.
This commit is contained in:
parent
8ea98cca5d
commit
370dc2dd8a
10 changed files with 147 additions and 48 deletions
|
|
@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||
import { createBrowserRouter, RouterProvider, Navigate } from 'react-router-dom';
|
||||
import Root from './routes/Root';
|
||||
import Chat from './routes/Chat';
|
||||
import Search from './routes/Search';
|
||||
import store from './store';
|
||||
import userAuth from './utils/userAuth';
|
||||
import { useRecoilState, useSetRecoilState } from 'recoil';
|
||||
|
|
@ -23,8 +24,12 @@ const router = createBrowserRouter([
|
|||
)
|
||||
},
|
||||
{
|
||||
path: 'chat/:conversationId',
|
||||
path: 'chat/:conversationId?',
|
||||
element: <Chat />
|
||||
},
|
||||
{
|
||||
path: 'search/:query?',
|
||||
element: <Search />
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue