You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
931 B
33 lines
931 B
import React, { FC } from 'react'
|
|
import { Link } from 'react-router-dom'
|
|
|
|
import { useConfig } from 'src/hooks'
|
|
import { App } from 'src/types'
|
|
|
|
interface Props {
|
|
app: App
|
|
}
|
|
|
|
const AppListItem: FC<Props> = ({ app }) => {
|
|
const config = useConfig()
|
|
|
|
return (
|
|
<article className="media">
|
|
{app.imageUrl &&
|
|
<figure className="media-left">
|
|
<p className="image is-64x64">
|
|
<img src={`${config.blobUrl}${app.imageUrl}`} style={{ width: 64 }} />
|
|
</p>
|
|
</figure>
|
|
}
|
|
<div className="media-content">
|
|
<div className="content">
|
|
<Link to={`/a/${app.id}`} className="title has-text-primary">{app.name}</Link>
|
|
{app.about && <p>{app.about}</p>}
|
|
</div>
|
|
</div>
|
|
</article>
|
|
)
|
|
}
|
|
|
|
export default AppListItem
|