mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
- Separated types and moved them into the proper ./types folder defined in the tsconfig.json. - Defined a new folder alias `#types`. - New eslint rule to enforce `import type` when a type is imported. - Removed Geometry Class and used manual Point types from `geojson`
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import SocialShareBar from './SocialShareBar'
|
|
|
|
import type { Item } from '#types/Item'
|
|
|
|
export const GroupSubHeaderView = ({
|
|
item,
|
|
shareBaseUrl,
|
|
platforms,
|
|
}: {
|
|
item: Item
|
|
shareBaseUrl: string
|
|
platforms?: string[]
|
|
}) => (
|
|
<div className='tw-px-6'>
|
|
<div className='tw-float-left tw-mt-2 tw-mb-4 tw-flex tw-items-center'>
|
|
{item.status && (
|
|
<div className='tw-mt-1.5'>
|
|
<span className='tw-text-sm tw-text-current tw-bg-base-300 tw-rounded tw-py-0.5 tw-px-2 tw-inline-flex tw-items-center tw-mr-2'>
|
|
{item.status}
|
|
</span>
|
|
</div>
|
|
)}
|
|
{item.group_type && (
|
|
<div className='tw-mt-1.5'>
|
|
<span className='tw-text-sm tw-text-current tw-bg-base-300 tw-rounded tw-py-1 tw-px-2'>
|
|
{item.group_type}
|
|
</span>
|
|
</div>
|
|
)}
|
|
</div>
|
|
<div>
|
|
<SocialShareBar
|
|
url={
|
|
shareBaseUrl && item.slug
|
|
? shareBaseUrl + item.slug
|
|
: window.location.protocol + '//' + window.location.host + '/item/' + item.id
|
|
}
|
|
title={item.name}
|
|
platforms={platforms}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|