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:
3
App.tsx
3
App.tsx
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user