import useFetch from 'fetch-suspense';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { FaInfoCircle } from 'react-icons/fa';
import { SiAppstore } from 'react-icons/si';
import { Card, Result } from '../core';
const Search: React.FC<{ query: string }> = ({ query }) => {
const { t } = useTranslation();
const response = useFetch(
`/api/services/appstore/${encodeURIComponent(query)}?country=${t(
'countryCode'
)}`
) as {
result: Array<{ name: string; viewURL: string; price: number; id: string }>;
};
const apps = response.result;
return (
<>
{apps && apps.length > 0 ? (
apps.map((app) => (
}
key={app.id}
/>
))
) : (
} />
)}
>
);
};
const AppStoreCard: React.FC<{ query: string }> = ({ query }) => {
const { t } = useTranslation();
return (
);
};
export default AppStoreCard;