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.
30 lines
879 B
30 lines
879 B
import React, { FC } from 'react'
|
|
import { Link } from 'react-router-dom'
|
|
|
|
import { useConfig, useTheme } from 'src/hooks'
|
|
import { App } from 'src/types'
|
|
|
|
interface Props {
|
|
app: App
|
|
}
|
|
|
|
const AppListItem: FC<Props> = ({ app }) => {
|
|
const theme = useTheme()
|
|
const config = useConfig()
|
|
|
|
return (
|
|
<div className="app-list-item" style={{ backgroundColor: theme.backgroundPrimary, borderColor: theme.backgroundSecondary }}>
|
|
{app.imageUrl &&
|
|
<div className="image">
|
|
<img src={`${config.blobUrl}${app.imageUrl}`} />
|
|
</div>
|
|
}
|
|
<div>
|
|
<Link to={`/a/${app.id}`} style={{ color: theme.primary }}>{app.name}</Link>
|
|
{app.about && <p style={{ color: theme.text }}>{app.about}</p>}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default AppListItem
|