Skip to content

Commit

Permalink
fix(typings): set the correct return types
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Feb 27, 2024
1 parent 89f1935 commit d8301e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/next-sanity/src/studio/NextStudioNoScript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const style = {
} as const

/** @internal */
export const NextStudioNoScript = (): React.ReactNode => (
export const NextStudioNoScript = (): JSX.Element => (
<noscript>
<div className="sanity-app-no-js__root">
<div className="sanity-app-no-js__content">
Expand Down
6 changes: 1 addition & 5 deletions packages/next-sanity/src/studio/registry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import {useServerInsertedHTML} from 'next/navigation.js'
import {useState} from 'react'
import {ServerStyleSheet, StyleSheetManager} from 'styled-components'

export function StyledComponentsRegistry({
children,
}: {
children: React.ReactNode
}): React.ReactNode {
export function StyledComponentsRegistry({children}: {children: React.ReactNode}): JSX.Element {
// Only create stylesheet once with lazy initial state
// x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state
const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet())
Expand Down

0 comments on commit d8301e0

Please sign in to comment.