import React from 'react';
import { getRouterConfig } from 'utils/spaceship';
import CurPagePreview from './CurPagePreview';
import NewPagePreview from './NewPagePreview';

const SpaceShipPreview = () => {
  const hrefConfig = getRouterConfig();
  const { existHash, openWay } = hrefConfig;
  return existHash && openWay === 2 ? <NewPagePreview /> : <CurPagePreview />;
};

export default SpaceShipPreview;
