Reputation: 1
I'm working with next13 and styled-components. In my file globalStyles.ts
everything is fine (apparently), and before everything worked perfectly. But after a while, the <GloobalStyles/>
import started to have errors.
This:
Type '{}' is missing the following properties from type 'TemplateStringsArray': raw, length, concat, join, and 23 more.ts(2740) (alias) const GlobalStyles: NamedExoticComponent<ExecutionProps & TemplateStringsArray> import GlobalStyles
This is the _app.tsx
file:
import type { AppProps } from 'next/app'
import { ThemeProvider } from 'styled-components';
import {GlobalStyles} from '../styles/global/GlobalStyles';
import theme from '../styles/theme';
export default function App({ Component, pageProps }: AppProps) {
return (
<ThemeProvider theme={theme}>
<Component {...pageProps} />
<GlobalStyles />
</ThemeProvider>
)
}
Upvotes: 0
Views: 118
Reputation: 76
The problem seems to be in the '../styles/global/GlobalStyles'
not in the _app.tsx
. Check the types there or share the code from that file.
Upvotes: 1