kopia lustrzana https://github.com/bugout-dev/moonstream
Merge branch 'main' into checkenv-parameters-node
commit
a2732cb763
|
@ -39,7 +39,7 @@
|
||||||
"react-hook-form": "^6.9.2",
|
"react-hook-form": "^6.9.2",
|
||||||
"react-hubspot-form": "^1.3.7",
|
"react-hubspot-form": "^1.3.7",
|
||||||
"react-icons": "^4.3.1",
|
"react-icons": "^4.3.1",
|
||||||
"react-pro-sidebar": "^0.6.0",
|
"react-pro-sidebar": "^0.7.1",
|
||||||
"react-query": "^3.18.1",
|
"react-query": "^3.18.1",
|
||||||
"react-showdown": "^2.3.0",
|
"react-showdown": "^2.3.0",
|
||||||
"react-slick": "^0.28.1",
|
"react-slick": "^0.28.1",
|
||||||
|
|
|
@ -20,7 +20,6 @@ import { useRouter, useSubscriptions } from "../../src/core/hooks";
|
||||||
import { BiTrash } from "react-icons/bi";
|
import { BiTrash } from "react-icons/bi";
|
||||||
import OverlayContext from "../../src/core/providers/OverlayProvider/context";
|
import OverlayContext from "../../src/core/providers/OverlayProvider/context";
|
||||||
import SubscriptionReport from "../../src/components/SubscriptionReport";
|
import SubscriptionReport from "../../src/components/SubscriptionReport";
|
||||||
import { v4 } from "uuid";
|
|
||||||
import { DRAWER_TYPES } from "../../src/core/providers/OverlayProvider/constants";
|
import { DRAWER_TYPES } from "../../src/core/providers/OverlayProvider/constants";
|
||||||
import Page404 from "../../src/components/FourOFour";
|
import Page404 from "../../src/components/FourOFour";
|
||||||
import { BsGear } from "react-icons/bs";
|
import { BsGear } from "react-icons/bs";
|
||||||
|
@ -158,7 +157,7 @@ const Analytics = () => {
|
||||||
)?.label;
|
)?.label;
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
key={v4()}
|
key={`${dashboardId}-subscription-report-${key}`}
|
||||||
flexBasis={plotMinW}
|
flexBasis={plotMinW}
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
minW={plotMinW}
|
minW={plotMinW}
|
||||||
|
|
|
@ -14,7 +14,6 @@ import { RiAccountCircleLine } from "react-icons/ri";
|
||||||
import useLogout from "../core/hooks/useLogout";
|
import useLogout from "../core/hooks/useLogout";
|
||||||
import UIContext from "../core/providers/UIProvider/context";
|
import UIContext from "../core/providers/UIProvider/context";
|
||||||
import { ALL_NAV_PATHES } from "../core/constants";
|
import { ALL_NAV_PATHES } from "../core/constants";
|
||||||
import { v4 } from "uuid";
|
|
||||||
|
|
||||||
const AccountIconButton = (props) => {
|
const AccountIconButton = (props) => {
|
||||||
const { logout } = useLogout();
|
const { logout } = useLogout();
|
||||||
|
@ -46,9 +45,9 @@ const AccountIconButton = (props) => {
|
||||||
</MenuGroup>
|
</MenuGroup>
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
{ui.isMobileView &&
|
{ui.isMobileView &&
|
||||||
ALL_NAV_PATHES.map((pathToLink) => {
|
ALL_NAV_PATHES.map((pathToLink, idx) => {
|
||||||
return (
|
return (
|
||||||
<MenuItem key={v4()}>
|
<MenuItem key={`AccountIconButton-All_nav_pathes-${idx}`}>
|
||||||
<RouterLink href={pathToLink.path}>
|
<RouterLink href={pathToLink.path}>
|
||||||
{pathToLink.title}
|
{pathToLink.title}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import Downshift from "downshift";
|
import Downshift from "downshift";
|
||||||
import { v4 } from "uuid";
|
|
||||||
import {
|
import {
|
||||||
Stack,
|
Stack,
|
||||||
Box,
|
Box,
|
||||||
|
@ -124,7 +123,7 @@ const AutoCompleter = ({
|
||||||
px={4}
|
px={4}
|
||||||
py={1}
|
py={1}
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
key={v4()}
|
key={`autocomplete-item-${index}`}
|
||||||
{...getItemProps({
|
{...getItemProps({
|
||||||
index,
|
index,
|
||||||
item,
|
item,
|
||||||
|
|
|
@ -144,102 +144,4 @@ const SuggestABI = ({ subscriptionId, state }) => {
|
||||||
|
|
||||||
const ChakraSuggestABI = chakra(SuggestABI);
|
const ChakraSuggestABI = chakra(SuggestABI);
|
||||||
|
|
||||||
export default ChakraSuggestABI;
|
export default ChakraSuggestABI;
|
||||||
|
|
||||||
{
|
|
||||||
/* <Stack pl={6} spacing={0}>
|
|
||||||
{getEvents(pickerItems).map((event, idx) => {
|
|
||||||
const pickedEvents = getEvents(pickedItems);
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
px={2}
|
|
||||||
key={v4()}
|
|
||||||
direction="row"
|
|
||||||
bgColor={idx % 2 == 0 ? "gray.50" : "gray.100"}
|
|
||||||
>
|
|
||||||
<Checkbox
|
|
||||||
isChecked={pickedEvents.some(
|
|
||||||
(pickedEvent) => pickedEvent.value === event.value
|
|
||||||
)}
|
|
||||||
onChange={() => {
|
|
||||||
const changedIndex = pickedItems.findIndex(
|
|
||||||
(pickedItem) =>
|
|
||||||
event.type === "event" &&
|
|
||||||
pickedItem.value === event.value
|
|
||||||
);
|
|
||||||
if (changedIndex === -1) {
|
|
||||||
setPickedItems((currentlyPicked) => {
|
|
||||||
const newPicked = [...currentlyPicked];
|
|
||||||
newPicked.push(event);
|
|
||||||
return newPicked;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setPickedItems((currentlyPicked) => {
|
|
||||||
const newPicked = [...currentlyPicked];
|
|
||||||
newPicked.splice(changedIndex, 1);
|
|
||||||
return newPicked;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{event.value}
|
|
||||||
</Checkbox>
|
|
||||||
<Spacer />
|
|
||||||
{event.stateMutability === "view" && (
|
|
||||||
<Badge variant="solid" colorScheme="orange" size="sm">
|
|
||||||
View
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
{event.stateMutability === "payable" && (
|
|
||||||
<Badge variant="solid" colorScheme="blue" size="sm">
|
|
||||||
Payable
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
{event.stateMutability === "nonpayable" && (
|
|
||||||
<Badge variant="solid" colorScheme="green" size="sm">
|
|
||||||
Non-Payable
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
{pickerItems
|
|
||||||
?.filter((unfilteredItem) => unfilteredItem.type === "function")
|
|
||||||
.map((item, idx) => {
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
px={2}
|
|
||||||
key={v4()}
|
|
||||||
direction="row"
|
|
||||||
bgColor={idx % 2 == 0 ? "gray.50" : "gray.100"}
|
|
||||||
>
|
|
||||||
<Checkbox
|
|
||||||
isChecked={pickedItems.some(
|
|
||||||
(pickedItem) =>
|
|
||||||
item.type === "function" &&
|
|
||||||
pickedItem.value === item.value
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{item.value}
|
|
||||||
</Checkbox>
|
|
||||||
<Spacer />
|
|
||||||
{item.stateMutability === "view" && (
|
|
||||||
<Badge variant="solid" colorScheme="orange" size="sm">
|
|
||||||
View
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
{item.stateMutability === "payable" && (
|
|
||||||
<Badge variant="solid" colorScheme="blue" size="sm">
|
|
||||||
Payable
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
{item.stateMutability === "nonpayable" && (
|
|
||||||
<Badge variant="solid" colorScheme="green" size="sm">
|
|
||||||
Non-Payable
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</Stack> */
|
|
||||||
}
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Stack, Checkbox } from "@chakra-ui/react";
|
import { Stack, Checkbox } from "@chakra-ui/react";
|
||||||
import { v4 } from "uuid";
|
|
||||||
|
|
||||||
const CheckboxGroupped = ({
|
const CheckboxGroupped = ({
|
||||||
groupName,
|
groupName,
|
||||||
|
@ -27,7 +26,7 @@ const CheckboxGroupped = ({
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
px={2}
|
px={2}
|
||||||
key={v4()}
|
key={`list-item-checkbox-${idx}`}
|
||||||
direction="row"
|
direction="row"
|
||||||
bgColor={idx % 2 == 0 ? "gray.50" : "gray.100"}
|
bgColor={idx % 2 == 0 ? "gray.50" : "gray.100"}
|
||||||
>
|
>
|
||||||
|
|
|
@ -18,7 +18,6 @@ import {
|
||||||
FOOTER_COLUMNS,
|
FOOTER_COLUMNS,
|
||||||
} from "../core/constants";
|
} from "../core/constants";
|
||||||
import { FaGithub, FaTwitter, FaDiscord } from "react-icons/fa";
|
import { FaGithub, FaTwitter, FaDiscord } from "react-icons/fa";
|
||||||
import { v4 } from "uuid";
|
|
||||||
|
|
||||||
const LINKS_SIZES = {
|
const LINKS_SIZES = {
|
||||||
fontWeight: "300",
|
fontWeight: "300",
|
||||||
|
@ -110,9 +109,9 @@ const Footer = () => (
|
||||||
</SocialButton>
|
</SocialButton>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
{Object.values(FOOTER_COLUMNS).map((columnEnum) => {
|
{Object.values(FOOTER_COLUMNS).map((columnEnum, colIndex) => {
|
||||||
return (
|
return (
|
||||||
<Stack align={"flex-start"} key={v4()}>
|
<Stack align={"flex-start"} key={`footer-list-column-${colIndex}`}>
|
||||||
{ALL_NAV_PATHES.filter(
|
{ALL_NAV_PATHES.filter(
|
||||||
(navPath) => navPath.footerCategory === columnEnum
|
(navPath) => navPath.footerCategory === columnEnum
|
||||||
).length > 0 && (
|
).length > 0 && (
|
||||||
|
@ -120,9 +119,13 @@ const Footer = () => (
|
||||||
<ListHeader>{columnEnum}</ListHeader>
|
<ListHeader>{columnEnum}</ListHeader>
|
||||||
{ALL_NAV_PATHES.filter(
|
{ALL_NAV_PATHES.filter(
|
||||||
(navPath) => navPath.footerCategory === columnEnum
|
(navPath) => navPath.footerCategory === columnEnum
|
||||||
).map((linkItem) => {
|
).map((linkItem, linkItemIndex) => {
|
||||||
return (
|
return (
|
||||||
<RouterLink passHref href={linkItem.path} key={v4()}>
|
<RouterLink
|
||||||
|
passHref
|
||||||
|
href={linkItem.path}
|
||||||
|
key={`footer-list-link-item-${linkItemIndex}-col-${colIndex}`}
|
||||||
|
>
|
||||||
<Link {...LINKS_SIZES}>{linkItem.title}</Link>
|
<Link {...LINKS_SIZES}>{linkItem.title}</Link>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
);
|
);
|
||||||
|
|
|
@ -103,4 +103,4 @@ const Report = ({ data, timeRange }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Report;
|
export default React.memo(Report);
|
||||||
|
|
|
@ -26,7 +26,6 @@ import {
|
||||||
} from "@chakra-ui/icons";
|
} from "@chakra-ui/icons";
|
||||||
import { MdSettings, MdDashboard, MdTimeline } from "react-icons/md";
|
import { MdSettings, MdDashboard, MdTimeline } from "react-icons/md";
|
||||||
import { WHITE_LOGO_W_TEXT_URL, ALL_NAV_PATHES } from "../core/constants";
|
import { WHITE_LOGO_W_TEXT_URL, ALL_NAV_PATHES } from "../core/constants";
|
||||||
import { v4 } from "uuid";
|
|
||||||
import useDashboard from "../core/hooks/useDashboard";
|
import useDashboard from "../core/hooks/useDashboard";
|
||||||
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
import OverlayContext from "../core/providers/OverlayProvider/context";
|
import OverlayContext from "../core/providers/OverlayProvider/context";
|
||||||
|
@ -102,9 +101,9 @@ const Sidebar = () => {
|
||||||
Login
|
Login
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{ui.isMobileView &&
|
{ui.isMobileView &&
|
||||||
ALL_NAV_PATHES.map((pathToLink) => {
|
ALL_NAV_PATHES.map((pathToLink, linkItemIndex) => {
|
||||||
return (
|
return (
|
||||||
<MenuItem key={v4()}>
|
<MenuItem key={`mobile-all-nav-path-item-${linkItemIndex}`}>
|
||||||
<RouterLink href={pathToLink.path}>
|
<RouterLink href={pathToLink.path}>
|
||||||
{pathToLink.title}
|
{pathToLink.title}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React from "react";
|
import React, { useMemo } from "react";
|
||||||
import { usePresignedURL } from "../core/hooks";
|
import { usePresignedURL } from "../core/hooks";
|
||||||
import Report from "./Report";
|
import Report from "./Report";
|
||||||
import {
|
import {
|
||||||
|
@ -10,7 +10,6 @@ import {
|
||||||
chakra,
|
chakra,
|
||||||
Link,
|
Link,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { v4 } from "uuid";
|
|
||||||
|
|
||||||
const HOUR_KEY = "Hourly";
|
const HOUR_KEY = "Hourly";
|
||||||
const DAY_KEY = "Daily";
|
const DAY_KEY = "Daily";
|
||||||
|
@ -30,6 +29,27 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
hideToastOn404: true,
|
hideToastOn404: true,
|
||||||
});
|
});
|
||||||
const plotMinW = "250px";
|
const plotMinW = "250px";
|
||||||
|
const eventKeys = useMemo(
|
||||||
|
() =>
|
||||||
|
Object.keys(data?.events ?? {}).length > 0
|
||||||
|
? Object.keys(data?.events)
|
||||||
|
: undefined,
|
||||||
|
[data]
|
||||||
|
);
|
||||||
|
const methodKeys = useMemo(
|
||||||
|
() =>
|
||||||
|
Object.keys(data?.methods ?? {}).length > 0
|
||||||
|
? Object.keys(data?.methods)
|
||||||
|
: undefined,
|
||||||
|
[data]
|
||||||
|
);
|
||||||
|
const genericKeys = useMemo(
|
||||||
|
() =>
|
||||||
|
Object.keys(data?.generic ?? {}).length > 0
|
||||||
|
? Object.keys(data?.generic)
|
||||||
|
: undefined,
|
||||||
|
[data]
|
||||||
|
);
|
||||||
if (failureCount < 1 && (!data || isLoading)) return <Spinner />;
|
if (failureCount < 1 && (!data || isLoading)) return <Spinner />;
|
||||||
if (failureCount >= 1 && (!data || isLoading))
|
if (failureCount >= 1 && (!data || isLoading))
|
||||||
return (
|
return (
|
||||||
|
@ -79,7 +99,7 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
flexWrap="wrap"
|
flexWrap="wrap"
|
||||||
alignContent={["inherit", "flex-start", null]}
|
alignContent={["inherit", "flex-start", null]}
|
||||||
>
|
>
|
||||||
{data?.web3_metric.map((metric) => {
|
{data?.web3_metric.map((metric, web3MetricIndex) => {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
|
@ -88,7 +108,7 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
p={2}
|
p={2}
|
||||||
m={1}
|
m={1}
|
||||||
bgColor="blue.100"
|
bgColor="blue.100"
|
||||||
key={v4()}
|
key={`web3-metric-${web3MetricIndex}`}
|
||||||
size="sm"
|
size="sm"
|
||||||
fontWeight="600"
|
fontWeight="600"
|
||||||
boxShadow="sm"
|
boxShadow="sm"
|
||||||
|
@ -111,7 +131,7 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</Flex>
|
||||||
{data?.events && Object.keys(data?.events) && (
|
{data?.events && eventKeys && (
|
||||||
<Flex
|
<Flex
|
||||||
w="100%"
|
w="100%"
|
||||||
h="auto"
|
h="auto"
|
||||||
|
@ -122,10 +142,10 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
<Heading size="md" pt={4}>
|
<Heading size="md" pt={4}>
|
||||||
Events
|
Events
|
||||||
</Heading>
|
</Heading>
|
||||||
{Object.keys(data.events).map((key) => {
|
{eventKeys.map((key) => {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
key={v4()}
|
key={`events-list-${key}`}
|
||||||
flexBasis={plotMinW}
|
flexBasis={plotMinW}
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
minW={plotMinW}
|
minW={plotMinW}
|
||||||
|
@ -154,7 +174,7 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
{data?.functions && Object.keys(data?.functions) && (
|
{data?.functions && methodKeys && (
|
||||||
<Flex
|
<Flex
|
||||||
w="100%"
|
w="100%"
|
||||||
h="auto"
|
h="auto"
|
||||||
|
@ -165,10 +185,10 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
<Heading size="md" pt={4}>
|
<Heading size="md" pt={4}>
|
||||||
functions
|
functions
|
||||||
</Heading>
|
</Heading>
|
||||||
{Object.keys(data.functions).map((key) => {
|
{methodKeys.map((key) => {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
key={v4()}
|
key={`methods-list-${key}`}
|
||||||
flexBasis={plotMinW}
|
flexBasis={plotMinW}
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
minW={plotMinW}
|
minW={plotMinW}
|
||||||
|
@ -197,7 +217,7 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
{data?.generic && Object.keys(data?.generic) && (
|
{data?.generic && genericKeys && (
|
||||||
<Flex
|
<Flex
|
||||||
w="100%"
|
w="100%"
|
||||||
h="auto"
|
h="auto"
|
||||||
|
@ -211,7 +231,7 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
{Object.keys(data.generic).map((key) => {
|
{Object.keys(data.generic).map((key) => {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
key={v4()}
|
key={`generics-list-${key}`}
|
||||||
flexBasis={plotMinW}
|
flexBasis={plotMinW}
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
minW={plotMinW}
|
minW={plotMinW}
|
||||||
|
@ -244,4 +264,4 @@ const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SubscriptionReport;
|
export default React.memo(SubscriptionReport);
|
||||||
|
|
|
@ -166,8 +166,6 @@ const UIProvider = ({ children }) => {
|
||||||
const [onboardingState, setOnboardingState] = useState(false);
|
const [onboardingState, setOnboardingState] = useState(false);
|
||||||
const [onboardingStep, setOnboardingStep] = useState();
|
const [onboardingStep, setOnboardingStep] = useState();
|
||||||
const [onboardingStateInit, setOnboardingStateInit] = useState(false);
|
const [onboardingStateInit, setOnboardingStateInit] = useState(false);
|
||||||
const [onboardingRedirectCheckPassed, setOnboardingRedirectCheckPassed] =
|
|
||||||
useState(false);
|
|
||||||
|
|
||||||
const setOnboardingComplete = useCallback(
|
const setOnboardingComplete = useCallback(
|
||||||
(newState) => {
|
(newState) => {
|
||||||
|
@ -211,20 +209,6 @@ const UIProvider = ({ children }) => {
|
||||||
}
|
}
|
||||||
}, [onboardingState, onboardingStep]);
|
}, [onboardingState, onboardingStep]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
//redirect to welcome page if yet not completed onboarding
|
|
||||||
if (isLoggedIn && onboardingState && !onboardingState?.is_complete) {
|
|
||||||
//shortcircuit this experience for now since /welcome is now default landing in the app screen
|
|
||||||
// router.replace("/welcome", undefined, { shallow: true });
|
|
||||||
}
|
|
||||||
if (isLoggedIn) {
|
|
||||||
setOnboardingRedirectCheckPassed(true);
|
|
||||||
} else {
|
|
||||||
setOnboardingRedirectCheckPassed(false);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line
|
|
||||||
}, [isLoggedIn, onboardingState?.is_complete]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//This will set up onboarding complete once user finishes each view at least once
|
//This will set up onboarding complete once user finishes each view at least once
|
||||||
if (onboardingState?.steps && user && isAppReady) {
|
if (onboardingState?.steps && user && isAppReady) {
|
||||||
|
@ -260,26 +244,12 @@ const UIProvider = ({ children }) => {
|
||||||
}, [onboardingStep, router.nextRouter.pathname, user, isAppReady]);
|
}, [onboardingStep, router.nextRouter.pathname, user, isAppReady]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (isInit && router.nextRouter.isReady && !isLoggingOut && !isLoggingIn) {
|
||||||
isInit &&
|
|
||||||
router.nextRouter.isReady &&
|
|
||||||
onboardingState &&
|
|
||||||
!isLoggingOut &&
|
|
||||||
!isLoggingIn &&
|
|
||||||
onboardingRedirectCheckPassed
|
|
||||||
) {
|
|
||||||
setAppReady(true);
|
setAppReady(true);
|
||||||
} else {
|
} else {
|
||||||
setAppReady(false);
|
setAppReady(false);
|
||||||
}
|
}
|
||||||
}, [
|
}, [isInit, router, isLoggingOut, isLoggingIn]);
|
||||||
isInit,
|
|
||||||
router,
|
|
||||||
onboardingState,
|
|
||||||
isLoggingOut,
|
|
||||||
isLoggingIn,
|
|
||||||
onboardingRedirectCheckPassed,
|
|
||||||
]);
|
|
||||||
|
|
||||||
//***************New chart item 's state ************************/
|
//***************New chart item 's state ************************/
|
||||||
const dashboardUpdateReducer = useCallback(
|
const dashboardUpdateReducer = useCallback(
|
||||||
|
|
Ładowanie…
Reference in New Issue