Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/components/Recording/VoiceRecorder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useState, useEffect, useRef } from 'react'
import { voiceApi } from '../../services/voice.js'
import './Recording.css'
import { useNavigate } from 'react-router-dom';
import Navbar from '../Navbar/NavBar'
import logo from '../../assets/wedaj.png';
import logo from '../../assets/wedaj.png';


const VoiceRecorder = ({
onRecordingComplete,
Expand Down
28 changes: 16 additions & 12 deletions src/components/VoiceJournal/HistoryPage.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import './HistoryPage.css'
import logo from '../../assets/wedaj.png';

const HistoryPage = ({ onLoginClick, onSignupClick, user, onLogout }) => {
const [showMenu, setShowMenu] = useState(false)
Expand Down Expand Up @@ -50,7 +51,10 @@ const HistoryPage = ({ onLoginClick, onSignupClick, user, onLogout }) => {
return (
<div className="history-page">
<header className="history-header">
<div className="logo">ወዳጅ</div>
<div className="logo">
<img src={logo} alt="Wedaj logo" className="logo-image" width="50px" />
</div>

{user ? (
<button className="hamburger-button" onClick={toggleMenu}>
<svg viewBox="0 0 24 24" width="24" height="24">
Expand All @@ -59,8 +63,8 @@ const HistoryPage = ({ onLoginClick, onSignupClick, user, onLogout }) => {
</button>
) : (
<div className="auth-buttons">
<button className="login-button" onClick={() => navigate('/log-in')}>Login</button>
<button className="signup-button" onClick={() => navigate('/sign-up')}>Sign Up</button>
<button className="login-button" onClick={() =>navigate('log-in')}>ግባ</button>
<button className="signup-button" onClick={()=> navigate('sign-up')}>ይመዝገቡ</button>
</div>
)}
</header>
Expand All @@ -69,52 +73,52 @@ const HistoryPage = ({ onLoginClick, onSignupClick, user, onLogout }) => {
<div className="menu-overlay" onClick={closeMenu}>
<div className="sidebar-menu" onClick={(e) => e.stopPropagation()}>
<div className="sidebar-header">
<h2>Menu</h2>
<h2>ማውጫ</h2>
<button className="close-button" onClick={closeMenu}>×</button>
</div>
<ul className="sidebar-nav">
<li className="sidebar-item" onClick={() => handleMenuClick('home')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
</svg>
<span>Home</span>
<span>ዋና ገጽ</span>
</li>
<li className="sidebar-item" onClick={() => handleMenuClick('record')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"/>
<path fill="currentColor" d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/>
</svg>
<span>Record</span>
<span>የድምጽ ቅጂ</span>
</li>
<li className="sidebar-item" onClick={() => handleMenuClick('mood')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-2-10c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm4 4h-4v4h4v-4z"/>
</svg>
<span>Mood Tracker</span>
<span>የስሜት መከታተያ</span>
</li>
<li className="sidebar-item" onClick={() => handleMenuClick('bible')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2V7zm0 8h2v2h-2v-2z"/>
</svg>
<span>Bible Guidance</span>
<span>የመጽሐፍ ቅዱስ መመሪያ</span>
</li>
<li className="sidebar-item" onClick={() => handleMenuClick('prayer')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2V7zm0 8h2v2h-2v-2z"/>
</svg>
<span>Prayer Request</span>
<span>የጸሎት ጥያቄ</span>
</li>
<li className="sidebar-item" onClick={() => handleMenuClick('settings')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.09-.61l-1.92-3.32c-.14-.23-.42-.31-.66-.19l-2.37 1.01c-.48-.38-.99-.72-1.54-1.01l-.33-2.53c-.03-.24-.24-.42-.49-.42h-3.84c-.25 0-.46.18-.49.42l-.33 2.53c-.55.29-1.06.63-1.54 1.01l-2.37-1.01c-.24-.12-.52-.04-.66.19l-1.92 3.32c-.14.23-.09.5.09.61l2.03 1.58c-.05.3-.09.61-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.09.61l1.92 3.32c.14.23.42.31.66.19l2.37-1.01c.48.38.99.72 1.54 1.01l.33 2.53c.03.24.24.42.49.42h3.84c.25 0 .46-.18.49-.42l.33-2.53c.55-.29 1.06-.63 1.54-1.01l2.37 1.01c.24.12.52.04.66-.19l1.92-3.32c.14-.23.09-.5-.09-.61l-2.03-1.58zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"/>
</svg>
<span>Settings</span>
<span>ማስትካክያ</span>
</li>
<li className="sidebar-item logout-item" onClick={() => handleMenuClick('logout')}>
<svg viewBox="0 0 24 24" width="20" height="20">
<path fill="currentColor" d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"/>
</svg>
<span>Logout</span>
<span>ይውጡ</span>
</li>
</ul>
</div>
Expand All @@ -124,7 +128,7 @@ const HistoryPage = ({ onLoginClick, onSignupClick, user, onLogout }) => {
<div className="recorder-content">
{/* GREETING - only at the beginning */}
<div className="greeting">
Hey, how are you doing today? 🌿
ሰላም ዛሬ እንዴት ነህ?
</div>

{/* Recording button for quick access */}
Expand Down