mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
made clickable album titles
This commit is contained in:
parent
671b2bb1b8
commit
118dad4e2b
3 changed files with 13 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
||||||
import React, { FC } from 'react';
|
import React, { FC, ReactElement } from 'react';
|
||||||
import * as styles from './styles.scss';
|
import * as styles from './styles.scss';
|
||||||
import { Group } from '~/components/containers/Group';
|
import { Group } from '~/components/containers/Group';
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import { NodeRelatedItem } from '~/components/node/NodeRelatedItem';
|
import { NodeRelatedItem } from '~/components/node/NodeRelatedItem';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
title: string;
|
title: ReactElement | string;
|
||||||
items: Partial<INode>[];
|
items: Partial<INode>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,11 @@
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@include title_with_line();
|
@include title_with_line();
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
|
|
|
@ -20,6 +20,7 @@ import { NodeDeletedBadge } from '~/components/node/NodeDeletedBadge';
|
||||||
import { NodeCommentForm } from '~/components/node/NodeCommentForm';
|
import { NodeCommentForm } from '~/components/node/NodeCommentForm';
|
||||||
import { Sticky } from '~/components/containers/Sticky';
|
import { Sticky } from '~/components/containers/Sticky';
|
||||||
import { Footer } from '~/components/main/Footer';
|
import { Footer } from '~/components/main/Footer';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import * as styles from './styles.scss';
|
import * as styles from './styles.scss';
|
||||||
import * as NODE_ACTIONS from '~/redux/node/actions';
|
import * as NODE_ACTIONS from '~/redux/node/actions';
|
||||||
|
@ -216,7 +217,11 @@ const NodeLayoutUnconnected: FC<IProps> = memo(
|
||||||
.filter(album => related.albums[album].length > 0)
|
.filter(album => related.albums[album].length > 0)
|
||||||
.map(album => (
|
.map(album => (
|
||||||
<NodeRelated
|
<NodeRelated
|
||||||
title={album}
|
title={
|
||||||
|
<Link to={URLS.NODE_TAG_URL(node.id, encodeURIComponent(album))}>
|
||||||
|
{album}
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
items={related.albums[album]}
|
items={related.albums[album]}
|
||||||
key={album}
|
key={album}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue