eddev 0.2.0-beta.47 → 0.2.0-beta.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hooks/useRPC.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TRPCClientError } from "@trpc/client";
2
3
  declare const trpc: {
3
4
  Provider: ({ client, queryClient, children, isPrepass, ssrContext, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.2.0-beta.47",
3
+ "version": "0.2.0-beta.48",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -0,0 +1,13 @@
1
+ import { fetchWordpressProps } from "../_utils/fetch-wordpress-props"
2
+
3
+ export default function Home() {
4
+ return <div />
5
+ }
6
+
7
+ export async function getStaticProps({ params }: any) {
8
+ const result = await fetchWordpressProps("/404")
9
+ console.log("404", result)
10
+ return {
11
+ props: result,
12
+ }
13
+ }
@@ -10,16 +10,18 @@ import { PageMeta } from "../_utils/PageMeta"
10
10
  import { withTRPC } from "@trpc/next"
11
11
 
12
12
  function Root({ Component, pageProps }: AppProps) {
13
+ const route = useRouter()
14
+ console.log("Route", route)
13
15
  const appData = useMemo(() => {
14
- return pageProps?.appData.data
16
+ return pageProps?.appData?.data
15
17
  }, [])
16
18
 
17
- const route = useRouter()
18
-
19
19
  const viewProps = pageProps?.viewData?.data
20
20
 
21
21
  const View = manifest[pageProps.view]
22
22
 
23
+ console.log("Page Props", pageProps)
24
+
23
25
  if (!pageProps.appData) return <div />
24
26
 
25
27
  return (