cached response for source list iconUrl

This commit is contained in:
Aria Moradi
2021-02-04 14:53:34 +03:30
parent 7284e0d4ae
commit 22bf49078f
4 changed files with 8 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ interface IProps {
export default function ExtensionCard(props: IProps) {
const {
extension: {
name, lang, versionName, installed, apkName,
name, lang, versionName, installed, apkName, iconUrl,
},
} = props;
const [installedState, setInstalledState] = useState<string>((installed ? 'uninstall' : 'install'));
@@ -81,7 +81,7 @@ export default function ExtensionCard(props: IProps) {
variant="rounded"
className={classes.icon}
alt={name}
src={`http://127.0.0.1:4567/api/v1/extension/icon/${apkName}`}
src={iconUrl}
/>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<Typography variant="h5" component="h2">