settings
parent
41d81e8f13
commit
2e4297ab64
|
@ -14,8 +14,6 @@ export default function StoreCalendarAuth() {
|
|||
const [storeId, setStoreId] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
setIsRequesting(true);
|
||||
|
||||
myFetch("/calendar/store", "GET")
|
||||
.then((res) => {
|
||||
setIsRequesting(false);
|
||||
|
|
|
@ -1,10 +1,34 @@
|
|||
import { Button } from "antd";
|
||||
import { Button, Spin } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Constants } from "../../../utils";
|
||||
import { Constants, myFetch } from "../../../utils";
|
||||
import { useEffect, useState } from "react";
|
||||
import MyCenteredContainer from "../../../Components/MyContainer";
|
||||
|
||||
export default function StoreCalendar() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [isRequesting, setIsRequesting] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
myFetch("/calendar/settings", "GET")
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
|
||||
setIsRequesting(false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (isRequesting) {
|
||||
return (
|
||||
<MyCenteredContainer>
|
||||
<Spin size="large" />
|
||||
</MyCenteredContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>{t("calendar.pageTitle")}</h1>
|
||||
|
|
Loading…
Reference in New Issue