kopia lustrzana https://github.com/bugout-dev/moonstream
remove console logs
rodzic
db7c68348c
commit
b2d20c8eb8
|
@ -39,7 +39,6 @@ export default function CachingApp({ Component, pageProps }) {
|
||||||
router.events.on("routeChangeComplete", handleStop);
|
router.events.on("routeChangeComplete", handleStop);
|
||||||
router.events.on("routeChangeError", handleStop);
|
router.events.on("routeChangeError", handleStop);
|
||||||
|
|
||||||
console.log("_app", router.asPath);
|
|
||||||
return () => {
|
return () => {
|
||||||
router.events.off("routeChangeStart", handleStart);
|
router.events.off("routeChangeStart", handleStart);
|
||||||
router.events.off("routeChangeComplete", handleStop);
|
router.events.off("routeChangeComplete", handleStop);
|
||||||
|
@ -49,8 +48,6 @@ export default function CachingApp({ Component, pageProps }) {
|
||||||
const getLayout =
|
const getLayout =
|
||||||
Component.getLayout || ((page) => <DefaultLayout>{page}</DefaultLayout>);
|
Component.getLayout || ((page) => <DefaultLayout>{page}</DefaultLayout>);
|
||||||
|
|
||||||
console.log("_app loaded", router.asPath);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<style global jsx>{`
|
<style global jsx>{`
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
ListItem,
|
ListItem,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
const Entry = () => {
|
const Entry = () => {
|
||||||
|
console.count("render stream!");
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useContext, useEffect } from "react";
|
import React, { useContext, useEffect, useRef } from "react";
|
||||||
import { getLayout } from "../src/layouts/AppLayout";
|
import { getLayout } from "../src/layouts/AppLayout";
|
||||||
import UIContext from "../src/core/providers/UIProvider/context";
|
import UIContext from "../src/core/providers/UIProvider/context";
|
||||||
import {
|
import {
|
||||||
|
@ -15,6 +15,9 @@ import {
|
||||||
Fade,
|
Fade,
|
||||||
chakra,
|
chakra,
|
||||||
useBoolean,
|
useBoolean,
|
||||||
|
Flex,
|
||||||
|
IconButton,
|
||||||
|
Tooltip,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import StepProgress from "../src/components/StepProgress";
|
import StepProgress from "../src/components/StepProgress";
|
||||||
import { ArrowLeftIcon, ArrowRightIcon } from "@chakra-ui/icons";
|
import { ArrowLeftIcon, ArrowRightIcon } from "@chakra-ui/icons";
|
||||||
|
@ -25,10 +28,11 @@ import StreamEntry from "../src/components/StreamEntry";
|
||||||
import SubscriptionsList from "../src/components/SubscriptionsList";
|
import SubscriptionsList from "../src/components/SubscriptionsList";
|
||||||
import { useSubscriptions } from "../src/core/hooks";
|
import { useSubscriptions } from "../src/core/hooks";
|
||||||
import router from "next/router";
|
import router from "next/router";
|
||||||
|
import { FaFilter } from "react-icons/fa";
|
||||||
|
|
||||||
const Welcome = () => {
|
const Welcome = () => {
|
||||||
|
console.count("render welcome!");
|
||||||
const { subscriptionsCache } = useSubscriptions();
|
const { subscriptionsCache } = useSubscriptions();
|
||||||
console.log("StepProgress page!");
|
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
const { mixpanel, isLoaded, MIXPANEL_PROPS } = useContext(AnalyticsContext);
|
const { mixpanel, isLoaded, MIXPANEL_PROPS } = useContext(AnalyticsContext);
|
||||||
const [profile, setProfile] = React.useState();
|
const [profile, setProfile] = React.useState();
|
||||||
|
@ -41,7 +45,6 @@ const Welcome = () => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const progressButtonCallback = (index) => {
|
const progressButtonCallback = (index) => {
|
||||||
console.log("progress button callback!", index);
|
|
||||||
ui.setOnboardingStep(index);
|
ui.setOnboardingStep(index);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,20 +60,20 @@ const Welcome = () => {
|
||||||
setShowSubscriptionForm.off();
|
setShowSubscriptionForm.off();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const scrollRef = useRef();
|
||||||
const handleNextClick = () => {
|
const handleNextClick = () => {
|
||||||
if (ui.onboardingStep < ui.onboardingSteps.length - 1) {
|
if (ui.onboardingStep < ui.onboardingSteps.length - 1) {
|
||||||
ui.setOnboardingStep(ui.onboardingStep + 1);
|
ui.setOnboardingStep(ui.onboardingStep + 1);
|
||||||
|
scrollRef?.current?.scrollIntoView();
|
||||||
} else {
|
} else {
|
||||||
ui.setisOnboardingComplete(true);
|
ui.setisOnboardingComplete(true);
|
||||||
router.push("/stream");
|
router.push("/stream");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("onboarding step:", ui.onboardingStep);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Scrollable>
|
<Scrollable>
|
||||||
<Stack px="7%" pt={4} w="100%" spacing={4}>
|
<Stack px="7%" pt={4} w="100%" spacing={4} ref={scrollRef}>
|
||||||
<StepProgress
|
<StepProgress
|
||||||
numSteps={ui.onboardingSteps.length}
|
numSteps={ui.onboardingSteps.length}
|
||||||
currentStep={ui.onboardingStep}
|
currentStep={ui.onboardingStep}
|
||||||
|
@ -362,8 +365,8 @@ const Welcome = () => {
|
||||||
also determines sequence of transaction!{" "}
|
also determines sequence of transaction!{" "}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
Gas Price - this is how much ether (gwei) is being paid
|
Gas Price - this is how much ether is being paid per gas
|
||||||
per gas unit
|
unit
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
Gas - Ammount of gas this event consumes
|
Gas - Ammount of gas this event consumes
|
||||||
|
@ -372,10 +375,30 @@ const Welcome = () => {
|
||||||
</chakra.span>
|
</chakra.span>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack
|
<Stack
|
||||||
pb={24}
|
pb={ui.isMobileView ? 24 : 8}
|
||||||
w={ui.isMobileView ? "100%" : "calc(100% - 300px)"}
|
w={ui.isMobileView ? "100%" : "calc(100% - 300px)"}
|
||||||
alignSelf="center"
|
alignSelf="center"
|
||||||
>
|
>
|
||||||
|
<Flex h="3rem" w="100%" bgColor="gray.100" alignItems="center">
|
||||||
|
<Flex maxW="90%"></Flex>
|
||||||
|
<Spacer />
|
||||||
|
<Tooltip
|
||||||
|
variant="onboarding"
|
||||||
|
placement={ui.isMobileView ? "bottom" : "right"}
|
||||||
|
label="Filtering menu"
|
||||||
|
isOpen={true}
|
||||||
|
maxW="150px"
|
||||||
|
hasArrow
|
||||||
|
>
|
||||||
|
<IconButton
|
||||||
|
mr={4}
|
||||||
|
// onClick={onOpen}
|
||||||
|
colorScheme="primary"
|
||||||
|
variant="ghost"
|
||||||
|
icon={<FaFilter />}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
|
</Flex>
|
||||||
<StreamEntry
|
<StreamEntry
|
||||||
mt={20}
|
mt={20}
|
||||||
entry={{
|
entry={{
|
||||||
|
@ -386,14 +409,29 @@ const Welcome = () => {
|
||||||
showOnboardingTooltips={true}
|
showOnboardingTooltips={true}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Stack
|
||||||
|
px={12}
|
||||||
|
// mt={24}
|
||||||
|
bgColor="gray.50"
|
||||||
|
borderRadius="xl"
|
||||||
|
boxShadow="xl"
|
||||||
|
py={4}
|
||||||
|
my={2}
|
||||||
|
>
|
||||||
|
<Heading as="h4" size="md">
|
||||||
|
Applying filters
|
||||||
|
</Heading>
|
||||||
|
<chakra.span fontWeight="semibold" pl={2}>
|
||||||
|
You can apply various filters by clicking filter menu button
|
||||||
|
<br />
|
||||||
|
{`Right now you can use it to select address from and to, we are adding more complex queries soon, stay tuna! `}
|
||||||
|
<br />
|
||||||
|
</chakra.span>
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Fade>
|
</Fade>
|
||||||
)}
|
)}
|
||||||
{ui.onboardingStep === 3 && (
|
|
||||||
<Fade in>
|
|
||||||
<Stack>Subscriptions onboarding</Stack>
|
|
||||||
</Fade>
|
|
||||||
)}
|
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<Button
|
<Button
|
||||||
colorScheme="secondary"
|
colorScheme="secondary"
|
||||||
|
@ -401,7 +439,10 @@ const Welcome = () => {
|
||||||
variant="outline"
|
variant="outline"
|
||||||
hidden={ui.onboardingStep === 0}
|
hidden={ui.onboardingStep === 0}
|
||||||
disabled={ui.onboardingStep === 0}
|
disabled={ui.onboardingStep === 0}
|
||||||
onClick={() => ui.setOnboardingStep(ui.onboardingStep - 1)}
|
onClick={() => {
|
||||||
|
ui.setOnboardingStep(ui.onboardingStep - 1);
|
||||||
|
scrollRef?.current?.scrollIntoView();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Previous
|
Previous
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -204,7 +204,6 @@ const EntriesNavigation = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const dropFilterArrayItem = (idx) => {
|
const dropFilterArrayItem = (idx) => {
|
||||||
console.log("dropFilterArrayItem", idx, filterState);
|
|
||||||
const oldArray = [...filterState];
|
const oldArray = [...filterState];
|
||||||
const newArray = oldArray.filter(function (ele) {
|
const newArray = oldArray.filter(function (ele) {
|
||||||
return ele != oldArray[idx];
|
return ele != oldArray[idx];
|
||||||
|
@ -242,7 +241,6 @@ const EntriesNavigation = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFilterStateCallback = (props) => {
|
const handleFilterStateCallback = (props) => {
|
||||||
console.log("handleFilterStateCallback", props);
|
|
||||||
const currentFilterState = [...filterState];
|
const currentFilterState = [...filterState];
|
||||||
currentFilterState.push({ ...props });
|
currentFilterState.push({ ...props });
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,6 @@ const _NewSubscription = ({ isFreeOption, onClose, setIsLoading }) => {
|
||||||
setColor(color.hex);
|
setColor(color.hex);
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("check errors:", errors);
|
|
||||||
if (!errors) return "";
|
if (!errors) return "";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -10,7 +10,6 @@ const StepProgress = ({
|
||||||
buttonTitles,
|
buttonTitles,
|
||||||
}) => {
|
}) => {
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
console.log("currentStep", currentStep, numSteps);
|
|
||||||
return (
|
return (
|
||||||
<Box w="100%" h="auto" pos="relative">
|
<Box w="100%" h="auto" pos="relative">
|
||||||
<ButtonGroup
|
<ButtonGroup
|
||||||
|
@ -24,7 +23,6 @@ const StepProgress = ({
|
||||||
>
|
>
|
||||||
{_.times(numSteps, (i) => {
|
{_.times(numSteps, (i) => {
|
||||||
const setActive = i === parseInt(currentStep) ? true : false;
|
const setActive = i === parseInt(currentStep) ? true : false;
|
||||||
console.log("setActive", setActive, i, parseInt(currentStep));
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
key={`${i}-progress-steps`}
|
key={`${i}-progress-steps`}
|
||||||
|
@ -51,8 +49,8 @@ const StepProgress = ({
|
||||||
transform="translateY(-50%)"
|
transform="translateY(-50%)"
|
||||||
h={2}
|
h={2}
|
||||||
w="full"
|
w="full"
|
||||||
hasStripe
|
// hasStripe
|
||||||
isAnimated
|
// isAnimated
|
||||||
max={numSteps - 1}
|
max={numSteps - 1}
|
||||||
min={0}
|
min={0}
|
||||||
value={currentStep}
|
value={currentStep}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import { useToast } from "../core/hooks";
|
||||||
import { useSubscriptions } from "../core/hooks";
|
import { useSubscriptions } from "../core/hooks";
|
||||||
|
|
||||||
const StreamEntry = ({ entry, showOnboardingTooltips, className }) => {
|
const StreamEntry = ({ entry, showOnboardingTooltips, className }) => {
|
||||||
console.log("stream entry:", entry);
|
|
||||||
const { subscriptionsCache } = useSubscriptions();
|
const { subscriptionsCache } = useSubscriptions();
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
const [copyString, setCopyString] = useState(false);
|
const [copyString, setCopyString] = useState(false);
|
||||||
|
|
|
@ -16,7 +16,6 @@ const toEth = (wei) => {
|
||||||
const TxABI = (props) => {
|
const TxABI = (props) => {
|
||||||
const byteCode = props.byteCode;
|
const byteCode = props.byteCode;
|
||||||
const abi = props.abi;
|
const abi = props.abi;
|
||||||
console.log(abi.functions);
|
|
||||||
return (
|
return (
|
||||||
<VStack spacing={3}>
|
<VStack spacing={3}>
|
||||||
<br />
|
<br />
|
||||||
|
|
Ładowanie…
Reference in New Issue