+ className="grid"
+ style={{
+ gridTemplateColumns: tier === 'desktop'
+ ? `4rem repeat(${days.length}, minmax(40px, 1fr))`
+ : `4rem repeat(${visibleDays.length}, 1fr)`
+ }}
+ >
{/* Time Rows */}
{timeSteps.map((step) => (
{/* Time Label */}
{step % 60 === 0 ? formatTimeLabel(step) : ''}
-
+
{/* Grid Cells */}
{visibleDays.map((day) => {
@@ -220,11 +221,11 @@ const Timetable = ({ from_date, to_date, day_start, day_end }: TimetableProps) =
transform: 'translateY(-50%)'
}}
/>
-
-
-
-
+
+
+
+
);
};
-export default Timetable;
\ No newline at end of file
+export default Timetable;
diff --git a/frontend/src/hooks/SettingsProvider.tsx b/frontend/src/hooks/SettingsProvider.tsx
index b4caf53..5a45487 100644
--- a/frontend/src/hooks/SettingsProvider.tsx
+++ b/frontend/src/hooks/SettingsProvider.tsx
@@ -1,4 +1,4 @@
-import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react';
+import { createContext, useState, useEffect, ReactNode } from 'react';
const STORAGE_KEY = 'baby-sleep-settings';
diff --git a/frontend/src/hooks/useSettings.ts b/frontend/src/hooks/useSettings.ts
index 2117d33..e2bdec0 100644
--- a/frontend/src/hooks/useSettings.ts
+++ b/frontend/src/hooks/useSettings.ts
@@ -1,5 +1,5 @@
import { useContext } from 'react';
-import { SettingsContext, Settings } from './SettingsProvider';
+import { SettingsContext } from './SettingsProvider';
export function useSettings() {
const context = useContext(SettingsContext);
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 447a1e0..7c919cd 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -3,9 +3,16 @@ import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
+const APP_VERSION = process.env.VITE_APP_VERSION || 'unknown';
+const APP_GITSHA = process.env.VITE_APP_GITSHA || 'unknown';
+
export default defineConfig({
base: './',
plugins: [react(), tailwindcss()],
+ define: {
+ __APP_VERSION__: JSON.stringify(APP_VERSION),
+ __APP_GITSHA__: JSON.stringify(APP_GITSHA),
+ },
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),