mirror of
https://github.com/uetchy/namae.git
synced 2025-03-16 20:20:38 +09:00
fix: play store result
This commit is contained in:
parent
afa2e7d52e
commit
096ce42e20
@ -29,8 +29,8 @@ export default async function handler(
|
||||
const apps = response[0][1][0][0][0].map((entry: any) => ({
|
||||
id: entry[12][0],
|
||||
name: entry[2],
|
||||
description: entry[4][1][1][1][1],
|
||||
author: entry[4][0][0][0],
|
||||
rating: entry[6][0][2][1][1],
|
||||
url: 'https://play.google.com' + entry[9][4][2],
|
||||
}));
|
||||
send(res, { result: apps.slice(0, 10) });
|
||||
|
@ -39,7 +39,11 @@ const Search: React.FC<{ query: string }> = ({ query }) => {
|
||||
/>
|
||||
))
|
||||
) : (
|
||||
<Result title={t('noResult')} icon={<FaInfoCircle />} />
|
||||
<Result
|
||||
title={t('noResult')}
|
||||
message={t('noResult')}
|
||||
icon={<FaInfoCircle />}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
@ -13,8 +13,8 @@ const Search: React.FC<{ query: string }> = ({ query }) => {
|
||||
result: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
author: string;
|
||||
rating: number;
|
||||
url: string;
|
||||
}>;
|
||||
};
|
||||
@ -26,14 +26,18 @@ const Search: React.FC<{ query: string }> = ({ query }) => {
|
||||
apps.map((app) => (
|
||||
<Result
|
||||
title={app.name}
|
||||
message={`Rating: ${app.rating}`}
|
||||
message={`${app.author}: ${app.description}`}
|
||||
link={app.url}
|
||||
icon={<IoMdAppstore />}
|
||||
key={app.id}
|
||||
/>
|
||||
))
|
||||
) : (
|
||||
<Result title={t('noResult')} icon={<FaInfoCircle />} />
|
||||
<Result
|
||||
title={t('noResult')}
|
||||
message={t('noResult')}
|
||||
icon={<FaInfoCircle />}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user