1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00
vault-frontend/src/constants/phrases.ts
2019-11-13 15:09:05 +07:00

14 lines
513 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { useMemo } from 'react';
export const PHRASES = {
BORIS_TITLE: ['Снова вместе', 'Я видел это во сне', 'Что тут у нас?'],
NOTHING_HERE: [
'Тут пусто и одиноко',
'Совсем ничего',
'Хм... Где все?',
'Тут будут наши с тобой сообщения',
],
};
export const getRandomPhrase = (key: keyof typeof PHRASES) =>
useMemo(() => PHRASES[key][Math.floor(Math.random() * PHRASES[key].length)], []);