-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
38 lines (35 loc) · 1.49 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This is a skeleton starter React page generated by Plasmic.
// This file is owned by you, feel free to edit as you see fit.
import * as React from "react";
import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-web/lib/host";
import GlobalContextsProvider from "../components/plasmic/app_codegen_demo/PlasmicGlobalContextsProvider";
import { PlasmicDashboard } from "../components/plasmic/app_codegen_demo/PlasmicDashboard";
import { useRouter } from "next/router";
function Dashboard() {
// Use PlasmicDashboard to render this component as it was
// designed in Plasmic, by activating the appropriate variants,
// attaching the appropriate event handlers, etc. You
// can also install whatever React hooks you need here to manage state or
// fetch data.
//
// Props you can pass into PlasmicDashboard are:
// 1. Variants you want to activate,
// 2. Contents for slots you want to fill,
// 3. Overrides for any named node in the component to attach behavior and data,
// 4. Props to set on the root node.
//
// By default, PlasmicDashboard is wrapped by your project's global
// variant context providers. These wrappers may be moved to
// Next.js Custom App component
// (https://nextjs.org/docs/advanced-features/custom-app).
return (
<PageParamsProvider__
route={useRouter()?.pathname}
params={useRouter()?.query}
query={useRouter()?.query}
>
<PlasmicDashboard />
</PageParamsProvider__>
);
}
export default Dashboard;