mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-24 05:28:11 +00:00
Preload onboarding (#606)
* no lazy onboarding * no lazy onboarding steps * Do not lazy load onboarding to prevent lazy-load white flash
This commit is contained in:
parent
8b11288764
commit
e973c1edbf
2 changed files with 22 additions and 11 deletions
|
@ -8,6 +8,8 @@ import PrivateRoute, {
|
|||
import { ToastContainer } from "react-toastify";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
import Login from "@/pages/Login";
|
||||
import OnboardingFlow from "@/pages/OnboardingFlow";
|
||||
|
||||
import { PfpProvider } from "./PfpContext";
|
||||
import { LogoProvider } from "./LogoContext";
|
||||
|
||||
|
@ -42,7 +44,6 @@ const DataConnectors = lazy(
|
|||
const DataConnectorSetup = lazy(
|
||||
() => import("@/pages/GeneralSettings/DataConnectors/Connectors")
|
||||
);
|
||||
const OnboardingFlow = lazy(() => import("@/pages/OnboardingFlow"));
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
|
|
|
@ -1,16 +1,26 @@
|
|||
import { ArrowLeft, ArrowRight } from "@phosphor-icons/react";
|
||||
import { lazy, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { isMobile } from "react-device-detect";
|
||||
import Home from "./Home";
|
||||
import LLMPreference from "./LLMPreference";
|
||||
import EmbeddingPreference from "./EmbeddingPreference";
|
||||
import VectorDatabaseConnection from "./VectorDatabaseConnection";
|
||||
import CustomLogo from "./CustomLogo";
|
||||
import UserSetup from "./UserSetup";
|
||||
import DataHandling from "./DataHandling";
|
||||
import Survey from "./Survey";
|
||||
import CreateWorkspace from "./CreateWorkspace";
|
||||
|
||||
const OnboardingSteps = {
|
||||
home: lazy(() => import("./Home")),
|
||||
"llm-preference": lazy(() => import("./LLMPreference")),
|
||||
"embedding-preference": lazy(() => import("./EmbeddingPreference")),
|
||||
"vector-database": lazy(() => import("./VectorDatabaseConnection")),
|
||||
"custom-logo": lazy(() => import("./CustomLogo")),
|
||||
"user-setup": lazy(() => import("./UserSetup")),
|
||||
"data-handling": lazy(() => import("./DataHandling")),
|
||||
survey: lazy(() => import("./Survey")),
|
||||
"create-workspace": lazy(() => import("./CreateWorkspace")),
|
||||
home: Home,
|
||||
"llm-preference": LLMPreference,
|
||||
"embedding-preference": EmbeddingPreference,
|
||||
"vector-database": VectorDatabaseConnection,
|
||||
"custom-logo": CustomLogo,
|
||||
"user-setup": UserSetup,
|
||||
"data-handling": DataHandling,
|
||||
survey: Survey,
|
||||
"create-workspace": CreateWorkspace,
|
||||
};
|
||||
|
||||
export default OnboardingSteps;
|
||||
|
|
Loading…
Add table
Reference in a new issue