diff --git a/src/app/page.tsx b/src/app/page.tsx index 9c4110b..bfcfb0c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,6 +2,7 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import ReactLenis from "lenis/react"; +import { useState, useEffect, useRef } from "react"; import ContactText from '@/components/sections/contact/ContactText'; import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia'; import FeatureCardSeven from '@/components/sections/feature/FeatureCardSeven'; @@ -11,6 +12,24 @@ import MetricCardFourteen from '@/components/sections/metrics/MetricCardFourteen import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline'; export default function LandingPage() { + const [alarmEnabled, setAlarmEnabled] = useState(false); + const audioRef = useRef(null); + + useEffect(() => { + const saved = localStorage.getItem('alarmEnabled'); + if (saved) setAlarmEnabled(JSON.parse(saved)); + audioRef.current = new Audio('/alarm-sound.mp3'); + }, []); + + const toggleAlarm = () => { + const newState = !alarmEnabled; + setAlarmEnabled(newState); + localStorage.setItem('alarmEnabled', JSON.stringify(newState)); + if (newState && audioRef.current) { + audioRef.current.play().catch(e => console.log("Playback prevented:", e)); + } + }; + return (
@@ -89,12 +78,9 @@ export default function LandingPage() { textboxLayout="split" useInvertedBackground={true} features={[ - { - title: "Timely Notifications", description: "Get pinged exactly when you need to start, ensuring no session goes forgotten.", imageSrc: "http://img.b2bpic.net/free-photo/schedule-time-management-planner-concept_53876-120482.jpg", imageAlt: "Reminder Bell"}, - { - title: "Workspace Focus", description: "Tools that help you maintain a dedicated study environment and keep distractions at bay.", imageSrc: "http://img.b2bpic.net/free-photo/young-man-learning-virtual-classroom_23-2149200215.jpg", imageAlt: "Focused Student"}, - { - title: "Smart Scheduling", description: "AI-optimized schedules that adapt to your pace and academic requirements.", imageSrc: "http://img.b2bpic.net/free-photo/light-equipment-grey-technology-serious_1134-1423.jpg", imageAlt: "Schedule Data"}, + { title: "Timely Notifications", description: "Get pinged exactly when you need to start, ensuring no session goes forgotten.", imageSrc: "http://img.b2bpic.net/free-photo/schedule-time-management-planner-concept_53876-120482.jpg", imageAlt: "Reminder Bell" }, + { title: "Workspace Focus", description: "Tools that help you maintain a dedicated study environment and keep distractions at bay.", imageSrc: "http://img.b2bpic.net/free-photo/young-man-learning-virtual-classroom_23-2149200215.jpg", imageAlt: "Focused Student" }, + { title: "Smart Scheduling", description: "AI-optimized schedules that adapt to your pace and academic requirements.", imageSrc: "http://img.b2bpic.net/free-photo/light-equipment-grey-technology-serious_1134-1423.jpg", imageAlt: "Schedule Data" }, ]} title="Stay Productive, Stay Ahead" description="Powerful tools designed specifically for students to manage their time and workload effectively." @@ -106,12 +92,9 @@ export default function LandingPage() { textboxLayout="default" useInvertedBackground={false} faqs={[ - { - id: "f1", title: "How do I set a reminder?", content: "Simply input your subject name and the date/time you plan to study in the add-reminder form."}, - { - id: "f2", title: "Can I delete a reminder?", content: "Yes, just tap the 'X' button next to the reminder in your list to remove it."}, - { - id: "f3", title: "Do I need an account?", content: "No, your reminders are stored locally in your browser so you can start right away."}, + { id: "f1", title: "How do I set a reminder?", content: "Simply input your subject name and the date/time you plan to study in the add-reminder form." }, + { id: "f2", title: "Can I delete a reminder?", content: "Yes, just tap the 'X' button next to the reminder in your list to remove it." }, + { id: "f3", title: "Do I need an account?", content: "No, your reminders are stored locally in your browser so you can start right away." }, ]} imageSrc="http://img.b2bpic.net/free-photo/support-community-aid-help-team-assistance-concept_53876-123806.jpg" mediaAnimation="slide-up" @@ -129,14 +112,10 @@ export default function LandingPage() { title="Proven Results" tag="Our Impact" metrics={[ - { - id: "m1", value: "10k+", description: "Happy Students"}, - { - id: "m2", value: "50k+", description: "Sessions Scheduled"}, - { - id: "m3", value: "95%", description: "Goal Achievement"}, - { - id: "m4", value: "24/7", description: "Always Available"}, + { id: "m1", value: "10k+", description: "Happy Students" }, + { id: "m2", value: "50k+", description: "Sessions Scheduled" }, + { id: "m3", value: "95%", description: "Goal Achievement" }, + { id: "m4", value: "24/7", description: "Always Available" }, ]} metricsAnimation="slide-up" /> @@ -145,12 +124,10 @@ export default function LandingPage() {
@@ -158,13 +135,11 @@ export default function LandingPage() {
); -} +} \ No newline at end of file