add configure button to source card

This commit is contained in:
Aria Moradi
2021-07-31 05:06:46 +04:30
parent f2bd5b8149
commit 75f635a28b
2 changed files with 3 additions and 1 deletions
@@ -48,7 +48,7 @@ interface IProps {
export default function SourceCard(props: IProps) {
const {
source: {
id, name, lang, iconUrl, supportsLatest,
id, name, lang, iconUrl, supportsLatest, isConfigurable,
},
} = props;
@@ -76,6 +76,7 @@ export default function SourceCard(props: IProps) {
</div>
</div>
<div style={{ display: 'flex' }}>
{isConfigurable && <Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/latest/`; }}>Configure</Button>}
<Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/search/`; }}>Search</Button>
{supportsLatest && <Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/latest/`; }}>Latest</Button>}
<Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/popular/`; }}>Browse</Button>
+1
View File
@@ -26,6 +26,7 @@ interface ISource {
iconUrl: string
supportsLatest: boolean
history: any
isConfigurable: boolean
}
interface IMangaCard {