feature(database-connection): Use default UserStatsService
This commit is contained in:
@@ -10,6 +10,7 @@ import {withRouter} from "react-router";
|
|||||||
import RequestError from "../../models/RequestError";
|
import RequestError from "../../models/RequestError";
|
||||||
import './MainPage.scss';
|
import './MainPage.scss';
|
||||||
import {ClipLoader} from "react-spinners";
|
import {ClipLoader} from "react-spinners";
|
||||||
|
import UserStatsService from "../../services/UserStatsService";
|
||||||
|
|
||||||
const MainPage: FC<IMainPageProps> = (props: IMainPageProps) => {
|
const MainPage: FC<IMainPageProps> = (props: IMainPageProps) => {
|
||||||
const [seasonId, setSeasonId] = useState(props.match.params.id)
|
const [seasonId, setSeasonId] = useState(props.match.params.id)
|
||||||
@@ -19,7 +20,7 @@ const MainPage: FC<IMainPageProps> = (props: IMainPageProps) => {
|
|||||||
const [spinnerColor] = useState('#61dafb')
|
const [spinnerColor] = useState('#61dafb')
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
UserStatsMockService.getStats(seasonId)
|
UserStatsService.getStats(seasonId)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
setSeasonStats(res)
|
setSeasonStats(res)
|
||||||
setLoadingState(false)
|
setLoadingState(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user