mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
New login screen with featured images
This commit is contained in:
parent
792d9bcda2
commit
c084f348d9
7 changed files with 105 additions and 49 deletions
|
@ -1,4 +1,5 @@
|
|||
import inspirationalQuotes from './json/quotes.json';
|
||||
import randomBackgrounds from './json/backgrounds.json';
|
||||
import type { Adventure, Checklist, Collection, Note, Transportation, User } from './types';
|
||||
|
||||
export function getRandomQuote() {
|
||||
|
@ -6,7 +7,7 @@ export function getRandomQuote() {
|
|||
const randomIndex = Math.floor(Math.random() * quotes.length);
|
||||
let quoteString = quotes[randomIndex].quote;
|
||||
let authorString = quotes[randomIndex].author;
|
||||
return '"' + quoteString + '" - ' + authorString;
|
||||
return { quote: quoteString, author: authorString };
|
||||
}
|
||||
|
||||
export function getFlag(size: number, country: string) {
|
||||
|
@ -274,3 +275,8 @@ export function isAdventureVisited(adventure: Adventure) {
|
|||
})
|
||||
);
|
||||
}
|
||||
|
||||
export function getRandomBackground() {
|
||||
const randomIndex = Math.floor(Math.random() * randomBackgrounds.backgrounds.length);
|
||||
return randomBackgrounds.backgrounds[randomIndex];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue