import React from 'react';
import { ConfigProvider } from '@alifd/next';
import { registerPage as defaultRegisterPage } from './engine';

export function registerPage(Page, pageCode) {
  const PageWrapper = (props) => {
    return (
      <ConfigProvider prefix="next-">
        <Page {...props} />
      </ConfigProvider>
    );
  }
  defaultRegisterPage(PageWrapper, pageCode);
}
