Skip to content

Commit

Permalink
fix: workaround error Cannot find namespace JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Dec 26, 2024
1 parent af04a3f commit 076f42a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/vike-react/src/integration/getPageElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { Suspense, useEffect } from 'react'
import type { PageContext } from 'vike/types'
import { PageContextProvider } from '../hooks/usePageContext.js'

function getPageElement(pageContext: PageContext): { page: JSX.Element; renderPromise: Promise<void> } {
function getPageElement(pageContext: PageContext): { page: React.JSX.Element; renderPromise: Promise<void> } {
const {
Page,
config: { Loading },
Expand Down
3 changes: 1 addition & 2 deletions packages/vike-react/src/types/PageContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type React from 'react'
import type { JSX } from 'react'
import type ReactDOM from 'react-dom/client'
import type { ConfigFromHookResolved } from './Config.js'
import type { PageHtmlStream } from '../integration/onRenderHtml.js'
Expand All @@ -11,7 +10,7 @@ declare global {
/** The root React component of the page */
Page?: () => React.ReactNode
/** The root React element of the page */
page?: JSX.Element
page?: React.JSX.Element
/** The React root DOM container */
root?: ReactDOM.Root

Expand Down

0 comments on commit 076f42a

Please sign in to comment.