refactor: update application code to use unified configuration

- Update App.tsx to use getAppConfig() instead of import.meta.env
- Update email templates to use getAppConfig() for base URL
- Update database strategy to use getDatabaseConfig() function
- Update mailgun service to use getter functions
- Remove direct unified config imports in favor of functions
- Ensure consistent configuration access throughout codebase
This commit is contained in:
William Valentin
2025-09-08 21:24:07 -07:00
parent 491f9d0314
commit a8647ff33d
4 changed files with 9 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ import React, {
useRef,
} from 'react';
import { generateSchedule, generateReminderSchedule } from './utils/schedule';
import { getAppConfig } from './utils/env';
import {
Medication,
Dose,
@@ -115,7 +116,7 @@ const Header: React.FC<{
className='hidden sm:flex items-center space-x-2 px-4 py-2 text-sm font-medium text-slate-700 bg-slate-100 rounded-lg hover:bg-slate-200 transition-colors dark:bg-slate-700 dark:text-slate-200 dark:hover:bg-slate-600'
>
<MenuIcon className='w-4 h-4' aria-hidden='true' />
<span>{import.meta.env.VITE_APP_NAME || 'Meds'}</span>
<span>{getAppConfig().name}</span>
</button>
<button
onClick={onManageReminders}