Added about page

This commit is contained in:
dohsimpson
2024-12-31 15:05:29 -05:00
parent 7195f0d1f2
commit e19798aa22
11 changed files with 2287 additions and 91 deletions

View File

@@ -2,11 +2,11 @@
import fs from 'fs/promises'
import path from 'path'
import {
HabitsData,
CoinsData,
CoinTransaction,
TransactionType,
import {
HabitsData,
CoinsData,
CoinTransaction,
TransactionType,
WishlistItemType,
WishlistData,
Settings,
@@ -163,3 +163,13 @@ export async function removeCoins(
await saveCoinsData(newData)
return newData
}
export async function getChangelog(): Promise<string> {
try {
const changelogPath = path.join(process.cwd(), 'CHANGELOG.md')
return await fs.readFile(changelogPath, 'utf8')
} catch (error) {
console.error('Error loading changelog:', error)
return '# Changelog\n\nNo changelog available.'
}
}