|
|
@@ -1,35 +1,35 @@
|
|
|
-import { useTranslation } from 'react-i18next'
|
|
|
+import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
-import btnAndroid from '@/assets/images/home/btn-android.svg'
|
|
|
-import btnAppStore from '@/assets/images/home/btn-app-store.svg'
|
|
|
-import btnGooglePlay from '@/assets/images/home/btn-google-play.svg'
|
|
|
-import btnMacos from '@/assets/images/home/btn-macos.svg'
|
|
|
-import btnWindows from '@/assets/images/home/btn-windows.svg'
|
|
|
-import devicesMockup from '@/assets/images/home/devices-mockup.png'
|
|
|
-import { useAppUrls } from '@/hooks/useAppUrls'
|
|
|
+import btnAndroid from '@/assets/images/home/btn-android.svg';
|
|
|
+import btnAppStore from '@/assets/images/home/btn-app-store.svg';
|
|
|
+import btnGooglePlay from '@/assets/images/home/btn-google-play.svg';
|
|
|
+import btnMacos from '@/assets/images/home/btn-macos.svg';
|
|
|
+import btnWindows from '@/assets/images/home/btn-windows.svg';
|
|
|
+import devicesMockup from '@/assets/images/home/devices-mockup.png';
|
|
|
+import { useAppUrls } from '@/hooks/useAppUrls';
|
|
|
|
|
|
-import Wrapper from './Wrapper'
|
|
|
+import Wrapper from './Wrapper';
|
|
|
|
|
|
interface PlatformButton {
|
|
|
- image: string
|
|
|
- alt: string
|
|
|
- urlKey: 'appleStoreUrl' | 'googleStoreUrl' | 'downloadUrlByPlatform'
|
|
|
+ image: string;
|
|
|
+ alt: string;
|
|
|
+ urlKey: 'appleStoreUrl' | 'googleStoreUrl' | 'downloadUrlByPlatform';
|
|
|
}
|
|
|
|
|
|
const STORE_BUTTONS: PlatformButton[] = [
|
|
|
{ image: btnAppStore, alt: 'App Store', urlKey: 'appleStoreUrl' },
|
|
|
{ image: btnGooglePlay, alt: 'Google Play', urlKey: 'googleStoreUrl' },
|
|
|
-]
|
|
|
+];
|
|
|
|
|
|
const PLATFORM_ICONS = [
|
|
|
{ image: btnAndroid, alt: 'Android' },
|
|
|
{ image: btnWindows, alt: 'Windows' },
|
|
|
{ image: btnMacos, alt: 'Mac OS' },
|
|
|
-] as const
|
|
|
+] as const;
|
|
|
|
|
|
export function ChoosePlatform() {
|
|
|
- const { t } = useTranslation()
|
|
|
- const urls = useAppUrls()
|
|
|
+ const { t } = useTranslation();
|
|
|
+ const urls = useAppUrls();
|
|
|
|
|
|
return (
|
|
|
<section className="w-full py-8 sm:py-10 lg:py-16">
|
|
|
@@ -46,16 +46,31 @@ export function ChoosePlatform() {
|
|
|
|
|
|
<div className="grid grid-cols-2 gap-6 px-4 w-full sm:flex sm:flex-wrap sm:items-center sm:justify-center">
|
|
|
{STORE_BUTTONS.map(({ image, alt, urlKey }) => {
|
|
|
- const url = urls[urlKey]
|
|
|
- if (!url) return null
|
|
|
+ const url = urls[urlKey];
|
|
|
+ if (!url) return null;
|
|
|
return (
|
|
|
- <a key={alt} href={url} target="_blank" rel="noopener noreferrer" className="h-[50px]">
|
|
|
- <img src={image} alt={alt} className="h-full w-full object-contain sm:w-auto" />
|
|
|
+ <a
|
|
|
+ key={alt}
|
|
|
+ href={url}
|
|
|
+ target="_blank"
|
|
|
+ rel="noopener noreferrer"
|
|
|
+ className="h-[50px]"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src={image}
|
|
|
+ alt={alt}
|
|
|
+ className="h-full w-full object-contain sm:w-auto"
|
|
|
+ />
|
|
|
</a>
|
|
|
- )
|
|
|
+ );
|
|
|
})}
|
|
|
{PLATFORM_ICONS.map(({ image, alt }) => (
|
|
|
- <img key={alt} src={image} alt={alt} className="h-[50px] w-full object-contain sm:w-auto" />
|
|
|
+ <img
|
|
|
+ key={alt}
|
|
|
+ src={image}
|
|
|
+ alt={alt}
|
|
|
+ className="h-[50px] w-full object-contain sm:w-auto"
|
|
|
+ />
|
|
|
))}
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -67,5 +82,5 @@ export function ChoosePlatform() {
|
|
|
/>
|
|
|
</Wrapper>
|
|
|
</section>
|
|
|
- )
|
|
|
+ );
|
|
|
}
|