diff --git a/package.json b/package.json index ef95577..ca2237b 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@hookform/resolvers": "^3.3.4", + "@tonconnect/ui-react": "^2.0.2", "@vkruglikov/react-telegram-web-app": "^2.1.9", "axios": "^1.6.7", "clsx": "^2.1.0", diff --git a/public/splash.gif b/public/splash.gif new file mode 100644 index 0000000..b1e68c1 Binary files /dev/null and b/public/splash.gif differ diff --git a/src/app/providers/index.tsx b/src/app/providers/index.tsx index 199d33a..7e644ed 100644 --- a/src/app/providers/index.tsx +++ b/src/app/providers/index.tsx @@ -1,6 +1,7 @@ import { ReactNode } from "react"; import { QueryClientProvider } from "react-query"; import { WebAppProvider } from "@vkruglikov/react-telegram-web-app"; +import { TonConnectUIProvider } from "@tonconnect/ui-react"; import { queryClient } from "~/shared/libs"; @@ -11,9 +12,15 @@ type ProvidersProps = { export const Providers = ({ children }: ProvidersProps) => { return ( - -
{children}
-
+ + +
{children}
+
+
); }; diff --git a/src/app/router/constants/index.ts b/src/app/router/constants/index.ts index f53c493..770f2ff 100644 --- a/src/app/router/constants/index.ts +++ b/src/app/router/constants/index.ts @@ -1,3 +1,4 @@ export const Routes = { Root: "/uploadContent", + ViewContent: "/viewContent", }; diff --git a/src/app/router/index.tsx b/src/app/router/index.tsx index 3d7d669..2ccd9ea 100644 --- a/src/app/router/index.tsx +++ b/src/app/router/index.tsx @@ -2,9 +2,11 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; import { Routes } from "~/app/router/constants"; import { RootPage } from "~/pages/root"; +import { ViewContentPage } from "~/pages/view-content"; const router = createBrowserRouter([ { path: Routes.Root, element: }, + { path: Routes.ViewContent, element: }, ]); export const AppRouter = () => { diff --git a/src/pages/root/index.tsx b/src/pages/root/index.tsx index dcc4a79..bffbdf5 100644 --- a/src/pages/root/index.tsx +++ b/src/pages/root/index.tsx @@ -4,11 +4,12 @@ import { PresubmitStep } from "./steps/presubmit-step"; import { useSteps } from "~/shared/hooks/use-steps"; import { PriceStep } from "~/pages/root/steps/price-step"; +import { WelcomeStep } from "~/pages/root/steps/welcome-step"; export const RootPage = () => { const { ActiveSection } = useSteps(({ nextStep, prevStep }) => { return [ - // , + , , // , , diff --git a/src/pages/root/steps/data-step/index.tsx b/src/pages/root/steps/data-step/index.tsx index ab14327..e5bd4fe 100644 --- a/src/pages/root/steps/data-step/index.tsx +++ b/src/pages/root/steps/data-step/index.tsx @@ -3,6 +3,7 @@ import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; import ReactPlayer from "react-player/lazy"; +import { useNavigate } from "react-router-dom"; import { FormLabel } from "~/shared/ui/form-label"; import { Input } from "~/shared/ui/input"; @@ -13,6 +14,7 @@ import { HiddenFileInput } from "~/shared/ui/hidden-file-input"; import { useRootStore } from "~/shared/stores/root"; import { Checkbox } from "~/shared/ui/checkbox"; import { useAuth } from "~/shared/services/auth"; +import { Routes } from "~/app/router/constants"; type DataStepProps = { nextStep(): void; @@ -22,6 +24,8 @@ export const DataStep = ({ nextStep }: DataStepProps) => { const rootStore = useRootStore(); const auth = useAuth(); + const navigate = useNavigate(); + const formSchema = useMemo(() => { return z.object({ name: z.string().min(1, "Обязательное поле"), @@ -154,14 +158,15 @@ export const DataStep = ({ nextStep }: DataStepProps) => {