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
14
src/constants/phrases.ts
Normal file
14
src/constants/phrases.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
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)], []);
|
Loading…
Add table
Add a link
Reference in a new issue