mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
random titles
This commit is contained in:
parent
7583a57b04
commit
9233ccbada
10 changed files with 63 additions and 11 deletions
|
@ -10,6 +10,7 @@ import { CommentForm } from '~/components/node/CommentForm';
|
|||
import { Group } from '~/components/containers/Group';
|
||||
import boris from '~/sprites/boris_robot.svg';
|
||||
import { NodeNoComments } from '~/components/node/NodeNoComments';
|
||||
import { getRandomPhrase } from '~/constants/phrases';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
node: selectNode(state),
|
||||
|
@ -36,6 +37,8 @@ const BorisLayoutUnconnected: FC<IProps> = ({
|
|||
user: { is_user },
|
||||
nodeLoadNode,
|
||||
}) => {
|
||||
const title = getRandomPhrase('BORIS_TITLE');
|
||||
|
||||
useEffect(() => {
|
||||
if (is_loading) return;
|
||||
nodeLoadNode(id, 'DESC');
|
||||
|
@ -47,8 +50,7 @@ const BorisLayoutUnconnected: FC<IProps> = ({
|
|||
|
||||
<div className={styles.image}>
|
||||
<div className={styles.caption}>
|
||||
<div>СНОВА</div>
|
||||
<div>ВМЕСТЕ</div>
|
||||
<div className={styles.caption_text}>{title}</div>
|
||||
</div>
|
||||
<img src={boris} />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue