Front: Fix User Model
This commit is contained in:
@@ -3,7 +3,7 @@ import Model from "./Model";
|
||||
import UserSettings from "./UserSettings";
|
||||
|
||||
interface User extends Model {
|
||||
name: string;
|
||||
username: string;
|
||||
email: string;
|
||||
xp: number;
|
||||
premium: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React from "react";
|
||||
import { useQueries, useQuery } from "react-query";
|
||||
import API from "../API";
|
||||
import LoadingComponent from "../components/Loading";
|
||||
@@ -43,10 +43,11 @@ const HomeView = () => {
|
||||
<LoadingComponent/>
|
||||
</Box>
|
||||
}
|
||||
console.log(userQuery.data);
|
||||
return <ScrollView>
|
||||
<Box style={{ display: 'flex', padding: 30 }}>
|
||||
<Box textAlign={ screenSize == 'small' ? 'center' : undefined } style={{ flexDirection, justifyContent: 'center', display: 'flex' }}>
|
||||
<Text fontSize="xl" flex={screenSize == 'small' ? 1 : 2}>{`${translate('welcome')} ${userQuery.data.name}!`} </Text>
|
||||
<Text fontSize="xl" flex={screenSize == 'small' ? 1 : 2}>{`${translate('welcome')} ${userQuery.data.username}!`} </Text>
|
||||
<Box flex={1}>
|
||||
<ProgressBar xp={userQuery.data.xp}/>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user