mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
fixed pushing tags
This commit is contained in:
parent
6836e00de1
commit
99426172b2
12 changed files with 79 additions and 22 deletions
|
@ -2,12 +2,14 @@ import React, { FC, HTMLAttributes } from 'react';
|
|||
import { range } from 'ramda';
|
||||
import * as styles from './styles.scss';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { INode } from '~/redux/types';
|
||||
import { getURL } from '~/utils/dom';
|
||||
|
||||
type IProps = HTMLAttributes<HTMLDivElement> & {}
|
||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||
items: Partial<INode>[];
|
||||
};
|
||||
|
||||
const NodeRelated: FC<IProps> = ({
|
||||
title,
|
||||
}) => (
|
||||
const NodeRelated: FC<IProps> = ({ title, items }) => (
|
||||
<Group className={styles.wrap}>
|
||||
<div className={styles.title}>
|
||||
<div className={styles.line} />
|
||||
|
@ -15,9 +17,13 @@ const NodeRelated: FC<IProps> = ({
|
|||
<div className={styles.line} />
|
||||
</div>
|
||||
<div className={styles.grid}>
|
||||
{
|
||||
range(1, 7).map(el => (<div className={styles.item} key={el} />))
|
||||
}
|
||||
{items.map(item => (
|
||||
<div
|
||||
className={styles.item}
|
||||
key={item.id}
|
||||
style={{ backgroundImage: `url("${getURL({ url: item.thumbnail })}")` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</Group>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue