Skip to content

Property 'table' does not exist on type '{}' #43

Open
@AimanAlmureish

Description

@AimanAlmureish

I am trying to implement it on a Next js project and I get the following error in the _app.tsx


import { I18nProvider } from "next-rosetta";
import type { ReactElement, ReactNode } from "react";
import type { NextPage } from "next";
import { AppProps } from "next/app";
import Layout from "../components/layout/layout";
import "../styles/globals.css";
import "../styles/kvass.min.css";

export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
  getLayout?: (page: ReactElement) => ReactNode;
};

type AppPropsWithLayout = AppProps & {
  Component: NextPageWithLayout;
};

function MyApp({ Component, pageProps }: AppPropsWithLayout) {
  const getLayout = Component.getLayout ?? ((page) => page);

  return (
    <I18nProvider table={pageProps.table}>
      {getLayout(<Component {...pageProps} />)}
    </I18nProvider>
  );
}

export default MyApp;


The pageProps.table is showing this error Property 'table' does not exist on type '{}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions