mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-23 13:08: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 { ToastContainer } from "react-toastify";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
import Login from "@/pages/Login";
|
import Login from "@/pages/Login";
|
||||||
|
import OnboardingFlow from "@/pages/OnboardingFlow";
|
||||||
|
|
||||||
import { PfpProvider } from "./PfpContext";
|
import { PfpProvider } from "./PfpContext";
|
||||||
import { LogoProvider } from "./LogoContext";
|
import { LogoProvider } from "./LogoContext";
|
||||||
|
|
||||||
|
@ -42,7 +44,6 @@ const DataConnectors = lazy(
|
||||||
const DataConnectorSetup = lazy(
|
const DataConnectorSetup = lazy(
|
||||||
() => import("@/pages/GeneralSettings/DataConnectors/Connectors")
|
() => import("@/pages/GeneralSettings/DataConnectors/Connectors")
|
||||||
);
|
);
|
||||||
const OnboardingFlow = lazy(() => import("@/pages/OnboardingFlow"));
|
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
import { ArrowLeft, ArrowRight } from "@phosphor-icons/react";
|
import { ArrowLeft, ArrowRight } from "@phosphor-icons/react";
|
||||||
import { lazy, useState } from "react";
|
import { useState } from "react";
|
||||||
import { isMobile } from "react-device-detect";
|
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 = {
|
const OnboardingSteps = {
|
||||||
home: lazy(() => import("./Home")),
|
home: Home,
|
||||||
"llm-preference": lazy(() => import("./LLMPreference")),
|
"llm-preference": LLMPreference,
|
||||||
"embedding-preference": lazy(() => import("./EmbeddingPreference")),
|
"embedding-preference": EmbeddingPreference,
|
||||||
"vector-database": lazy(() => import("./VectorDatabaseConnection")),
|
"vector-database": VectorDatabaseConnection,
|
||||||
"custom-logo": lazy(() => import("./CustomLogo")),
|
"custom-logo": CustomLogo,
|
||||||
"user-setup": lazy(() => import("./UserSetup")),
|
"user-setup": UserSetup,
|
||||||
"data-handling": lazy(() => import("./DataHandling")),
|
"data-handling": DataHandling,
|
||||||
survey: lazy(() => import("./Survey")),
|
survey: Survey,
|
||||||
"create-workspace": lazy(() => import("./CreateWorkspace")),
|
"create-workspace": CreateWorkspace,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default OnboardingSteps;
|
export default OnboardingSteps;
|
||||||
|
|
Loading…
Add table
Reference in a new issue