Skip to content

Commit

Permalink
Fix About page to Conversation navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-shuy committed Oct 7, 2023
1 parent ffb7ad1 commit b983095
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from 'react';
import { NavLink } from 'react-router-dom';
import { NavLink, useNavigate } from 'react-router-dom';
import Arrow1 from './assets/arrow.svg';
import Arrow2 from './assets/dropdown-arrow.svg';
import Exit from './assets/exit.svg';
Expand Down Expand Up @@ -60,6 +60,8 @@ export default function Navigation() {
const embeddingsName =
import.meta.env.VITE_EMBEDDINGS_NAME || 'openai_text-embedding-ada-002';

const navigate = useNavigate();

useEffect(() => {
if (!conversations) {
getConversations()
Expand Down Expand Up @@ -111,6 +113,7 @@ export default function Navigation() {
})
.then((response) => response.json())
.then((data) => {
navigate('/');
dispatch(setConversation(data));
dispatch(
updateConversationId({
Expand Down

0 comments on commit b983095

Please sign in to comment.