forked from polka_billy/porridger
Added user points indicator
This commit is contained in:
@ -8,10 +8,12 @@ const initialUser: User = import.meta.env.DEV ? { // Temporary, until api is rea
|
||||
id: Math.random() * 100,
|
||||
name: faker.person.firstName() + ' ' + faker.person.lastName(),
|
||||
regDate: faker.date.anytime().getTime(),
|
||||
points: Math.round(Math.random() * 1000),
|
||||
} : {
|
||||
id: -1,
|
||||
name: '',
|
||||
regDate: 0,
|
||||
points: 0,
|
||||
}
|
||||
|
||||
const composeUserURL = () => (
|
||||
|
@ -4,6 +4,7 @@ type User = {
|
||||
id: number,
|
||||
name: string,
|
||||
regDate: number,
|
||||
points: number
|
||||
}
|
||||
|
||||
const isUser = (obj: unknown): obj is User => (
|
||||
@ -11,6 +12,7 @@ const isUser = (obj: unknown): obj is User => (
|
||||
'id': 'number',
|
||||
'name': 'string',
|
||||
'regDate': 'number',
|
||||
'points': 'number',
|
||||
})
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user