ui enhance

This commit is contained in:
2026-03-04 11:49:45 +05:30
parent 190243081a
commit bed32863da
11 changed files with 731 additions and 1448 deletions

View File

@@ -11,21 +11,7 @@ interface JournalEntry {
export default function HistoryPage() {
const [currentMonth, setCurrentMonth] = useState(new Date())
// Mock data - replace with actual Firebase data later
const mockEntries: JournalEntry[] = [
{
id: '1',
date: new Date(2026, 1, 12),
title: 'Feeling much lighter today',
content: 'After the long conversation yesterday, I woke up with a sense of clarity I haven\'t felt in weeks...'
},
{
id: '2',
date: new Date(2026, 1, 5),
title: 'Morning thoughts',
content: 'The coffee smells amazing this morning. Simple pleasures like this remind me...'
}
]
const entries: JournalEntry[] = []
const getDaysInMonth = (date: Date) => {
const year = date.getFullYear()
@@ -39,7 +25,7 @@ export default function HistoryPage() {
}
const hasEntryOnDate = (day: number) => {
return mockEntries.some(entry => {
return entries.some(entry => {
const entryDate = new Date(entry.date)
return entryDate.getDate() === day &&
entryDate.getMonth() === currentMonth.getMonth() &&
@@ -82,12 +68,6 @@ export default function HistoryPage() {
return (
<div className="history-page">
<div className="history-bg-decoration">
<div className="bg-orb bg-orb-1"></div>
<div className="bg-orb bg-orb-2"></div>
<div className="bg-pattern"></div>
</div>
<header className="history-header">
<div className="history-header-text">
<h1>History</h1>
@@ -155,7 +135,11 @@ export default function HistoryPage() {
<h3 className="recent-entries-title">RECENT ENTRIES</h3>
<div className="entries-list">
{mockEntries.map(entry => (
{entries.length === 0 ? (
<p style={{ color: '#9ca3af', fontSize: '0.875rem', textAlign: 'center', padding: '1.5rem 0', fontFamily: 'Inter, sans-serif' }}>
No entries yet. Start writing!
</p>
) : entries.map(entry => (
<button
key={entry.id}
type="button"