LinkedInAttic / hopscotch

A framework to make it easy for developers to add product tours to their pages.
Apache License 2.0
4.2k stars 666 forks source link

Starting a new tour on the end of a tour not working #349

Open saikmadana opened 6 years ago

saikmadana commented 6 years ago
// Take the tour
takeToTour() {
    const tour = {
        id: "cryptex-tour",
        showPrevButton: true,
        i18n: {
            closeTooltip: String.fromCharCode(10060)
        },
        onEnd: () => {
            // Clearing cookies for next tour
            this.hopscotch.endTour(true);
            const endtour = {
                id: "tour-later",
                i18n: {
                    closeTooltip: String.fromCharCode(10060)
                },
                steps: [
                    {
                        title: "Access Ticker:",
                        content: "dummy tour"
                        target: "later",
                        placement: "bottom",
                        xOffset: 40
                    }
                ]
            }
            this.hopscotch.startTour(endtour, 0);
        },
        steps: [
            {
                title: "Price Ticker:",
                content: "You can navigate between markets and select your desired currency"
                target: "marketstour",
                placement: "bottom",
                xOffset: 40,
                delay: 300
            },
            {
                title: "Balances & Wallets:",
                content: "You have a separate wallet for each currency"
                target: "balancewallettour",
                placement: "bottom",
                xOffset: 40
            },
            {
                title: "Order Form:",
                content: "Order form gives you the number of order types of which market"
                target: "orderformtour",
                placement: "right",
                yOffset: 30
            }
        ]
    };
    this.hopscotch.startTour(tour, 0);
}

In the above code, I am trying to invoke another hopscotch tour after finishing the first tour. But it is not starting the next tour. Help me know where I went wrong.

Thank you...