diff --git a/src/App.tsx b/src/App.tsx index 1584ba2..cfc00f4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,6 +7,7 @@ import { FeaturesGrid } from './components/FeaturesGrid/FeaturesGrid'; import { SEO } from './components/SEO/SEO'; import './style.css' import { MessageSteps } from './components/MessageSteps/MessageSteps'; +import { Footer } from './components/Footer/Footer'; export default function App() { @@ -17,6 +18,7 @@ export default function App() { + ) -} \ No newline at end of file +} diff --git a/src/components/DownloadCenter/DownloadCenter.tsx b/src/components/DownloadCenter/DownloadCenter.tsx index 6cf1c24..3a48575 100644 --- a/src/components/DownloadCenter/DownloadCenter.tsx +++ b/src/components/DownloadCenter/DownloadCenter.tsx @@ -33,14 +33,14 @@ interface UpdateItem { const fetchUpdates = async (): Promise => { try { const response = await fetch('https://sdu.rosetta.im/updates/all'); - const data = await response.json(); + const data = (await response.json()) as { items?: UpdateItem[] }; - return (data.items || []).map((item: UpdateItem) => ({ + return (data.items || []).map((item) => ({ platform: item.platform, arch: item.arch, version: item.version, link: new URL(item.downloadUrl, 'https://sdu.rosetta.im').toString(), - })).sort((a : any, b : any) => { + })).sort((a, b) => { const platformOrder = ['darwin', 'linux', 'win32', 'android']; const archOrder = ['arm64', 'x64', 'universal'] const platformComparison = platformOrder.indexOf(a.platform) - platformOrder.indexOf(b.platform); @@ -174,4 +174,4 @@ export function DownloadCenter() { ); -} \ No newline at end of file +} diff --git a/src/components/FeaturesGrid/FeaturesGrid.tsx b/src/components/FeaturesGrid/FeaturesGrid.tsx index 31e384f..df27858 100644 --- a/src/components/FeaturesGrid/FeaturesGrid.tsx +++ b/src/components/FeaturesGrid/FeaturesGrid.tsx @@ -1,9 +1,10 @@ -import { IconGauge, IconLock, IconMessage2, IconServer, IconUser, IconUsersGroup } from '@tabler/icons-react'; +import { IconGauge, IconLock, IconMessage2, IconServer, IconUser, IconUsersGroup, type TablerIcon } from '@tabler/icons-react'; import { Container, Flex, SimpleGrid, Text, ThemeIcon, Title } from '@mantine/core'; +import type { ReactNode } from 'react'; import classes from './FeaturesGrid.module.css'; import { RosettaLogo } from '../RosettaLogo/RosettaLogo'; -export const MOCKDATA = [ +const MOCKDATA = [ { icon: IconGauge, title: 'Performance', @@ -43,9 +44,9 @@ export const MOCKDATA = [ ]; interface FeatureProps { - icon: React.FC; - title: React.ReactNode; - description: React.ReactNode; + icon: TablerIcon; + title: ReactNode; + description: ReactNode; } export function Feature({ icon: Icon, title, description }: FeatureProps) { @@ -94,4 +95,4 @@ export function FeaturesGrid() { ); -} \ No newline at end of file +} diff --git a/src/components/Footer/Footer.module.css b/src/components/Footer/Footer.module.css new file mode 100644 index 0000000..f3fa417 --- /dev/null +++ b/src/components/Footer/Footer.module.css @@ -0,0 +1,9 @@ +.footer { + padding: var(--mantine-spacing-xl) var(--mantine-spacing-md); + border-top: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-5)); +} + +.legal { + max-width: 720px; + margin: 0 auto; +} diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx new file mode 100644 index 0000000..43ced14 --- /dev/null +++ b/src/components/Footer/Footer.tsx @@ -0,0 +1,16 @@ +import { Text } from '@mantine/core'; +import classes from './Footer.module.css'; + +const LEGAL_NAME = 'ROSETTA CLOUD SERVICES LIMITED'; + +export function Footer() { + const currentYear = new Date().getFullYear(); + + return ( + + ); +}