cached extension icon

This commit is contained in:
Aria Moradi
2021-02-04 14:47:27 +03:30
parent d39d075b1a
commit 7284e0d4ae
9 changed files with 87 additions and 76 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ interface IProps {
export default function ExtensionCard(props: IProps) {
const {
extension: {
name, lang, versionName, iconUrl, installed, apkName,
name, lang, versionName, installed, apkName,
},
} = 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={iconUrl}
src={`http://127.0.0.1:4567/api/v1/extension/icon/${apkName}`}
/>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<Typography variant="h5" component="h2">
+1
View File
@@ -9,6 +9,7 @@ interface IExtension {
iconUrl: string
installed: boolean
apkName: string
pkgName: string
}
interface ISource {