1
0
Fork 0
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:
Fedor Katurov 2019-11-13 15:09:05 +07:00
parent 7583a57b04
commit 9233ccbada
10 changed files with 63 additions and 11 deletions

View file

@ -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>

View file

@ -129,3 +129,8 @@
font-size: 48px;
}
}
.caption_text {
max-width: 400px;
text-transform: uppercase;
}