Skip to content
Open
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
10 changes: 6 additions & 4 deletions frontend/src/components/navbar/UserIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { User, List, MessageCircle } from 'lucide-react';
import { Link, useNavigate } from 'react-router-dom';
import { Link } from 'react-router-dom';
import { assessmentApi } from '@/src/pages/assessment/api';
import { getConversationsList } from '@/src/pages/chat/sidebar/api/get-list/getConversationsList';
import { useAuth } from '@/src/pages/auth/context/useAuthContext';
Expand All @@ -10,7 +10,6 @@ const UserIcon: React.FC = () => {
const [hasHistory, setHasHistory] = useState(false);
const [hasConversations, setHasConversations] = useState(false);
const [loading, setLoading] = useState(true);
const navigate = useNavigate();

useEffect(() => {
const checkHistory = async () => {
Expand Down Expand Up @@ -69,6 +68,7 @@ const UserIcon: React.FC = () => {
<div className="flex items-center gap-4 text-gray-500">
{!loading && hasConversations && (
<button
type="button"
onClick={handleChatClick}
title="Chat with Dottie"
className="text-sm font-medium hover:text-pink-600"
Expand All @@ -78,16 +78,18 @@ const UserIcon: React.FC = () => {
)}
{!loading && hasHistory && (
<button
type="button"
onClick={handleHistoryClick}
title="Assessment History"
className="text-sm font-medium hover:text-pink-600"
>
<List className="h-5 w-5" />
</button>
)}
<button
<button
type="button"
onClick={handleProfileClick}
title="Profile"
title="Profile"
className="hover:text-pink-600"
>
<User className="h-5 w-5" />
Expand Down