New Badges components: destination, public, status, teams + container/status

This commit is contained in:
Gabriel Engel
2022-11-23 07:52:59 -03:00
parent c2d72ad309
commit 9d45ab3246
6 changed files with 152 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ import { addToast } from '$lib/store';
export const asyncSleep = (delay: number) =>
new Promise((resolve) => setTimeout(resolve, delay));
export let initials = (str:string) => (str||'').split(' ').map( (wrd) => wrd[0]).join('')
export function errorNotification(error: any | { message: string }): void {
if (error.message) {
if (error.message === 'Cannot read properties of undefined (reading \'postMessage\')') {
@@ -87,4 +89,4 @@ export function handlerNotFoundLoad(error: any, url: URL) {
export function getRndInteger(min: number, max: number) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
}