diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index 17f559b..4a8b0e6 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -1,166 +1,305 @@ - import React, { useEffect, useState } from 'react'; import type { ReactElement } from 'react'; import Head from 'next/head'; import Link from 'next/link'; +import { useRouter } from 'next/router'; +import * as icon from '@mdi/js'; +import BaseIcon from '../components/BaseIcon'; import BaseButton from '../components/BaseButton'; import CardBox from '../components/CardBox'; -import SectionFullScreen from '../components/SectionFullScreen'; import LayoutGuest from '../layouts/Guest'; -import BaseDivider from '../components/BaseDivider'; -import BaseButtons from '../components/BaseButtons'; import { getPageTitle } from '../config'; -import { useAppSelector } from '../stores/hooks'; -import CardBoxComponentTitle from "../components/CardBoxComponentTitle"; -import { getPexelsImage, getPexelsVideo } from '../helpers/pexels'; +import { useAppDispatch, useAppSelector } from '../stores/hooks'; +import { fetch as fetchDevices } from '../stores/devices/devicesSlice'; +export default function LandingPage() { + const router = useRouter(); + const dispatch = useAppDispatch(); + const { currentUser } = useAppSelector((state) => state.auth); + const { devices, loading: devicesLoading } = useAppSelector((state) => state.devices); + const darkMode = useAppSelector((state) => state.style.darkMode); -export default function Starter() { - const [illustrationImage, setIllustrationImage] = useState({ - src: undefined, - photographer: undefined, - photographer_url: undefined, - }) - const [illustrationVideo, setIllustrationVideo] = useState({video_files: []}) - const [contentType, setContentType] = useState('video'); - const [contentPosition, setContentPosition] = useState('right'); - const textColor = useAppSelector((state) => state.style.linkColor); + const [activeTab, setActiveTab] = useState('pc'); - const title = 'App Draft' + useEffect(() => { + if (currentUser) { + dispatch(fetchDevices({ query: '?limit=5' })); + } + }, [currentUser, dispatch]); - // Fetch Pexels image/video - useEffect(() => { - async function fetchData() { - const image = await getPexelsImage(); - const video = await getPexelsVideo(); - setIllustrationImage(image); - setIllustrationVideo(video); - } - fetchData(); - }, []); - - const imageBlock = (image) => ( -
- ); - - const videoBlock = (video) => { - if (video?.video_files?.length > 0) { - return ( -This is a React.js/Node.js app generated by the Flatlogic Web App Generator
-For guides and documentation please check - your local README.md and the Flatlogic documentation
+ {/* Navigation */} +© 2026 {title}. All rights reserved
- - Privacy Policy - -+ SecureGuard keeps your PC and phone protected with a unified dashboard. Connect, scan, and secure your digital life with one click. +
+Managing {devices?.length || 0} active devices
+No devices connected yet.
++ SecureGuard provides advanced security features tailored for both desktop and mobile environments. +
++ {feature.description} +
++ Install SecureGuard on your computer and mobile phone to enable cross-device security monitoring and remote management. +
+