index.js 313 Bytes
Newer Older
xiaohuoni's avatar
xiaohuoni committed
1 2 3 4 5 6 7 8 9 10 11 12
import React from 'react';
import BasicLayout from './BasicLayout';
import UserLayout from './UserLayout';

export default props => {
  const { location } = props;
  const { pathname } = location;
  if (/\/user/i.test(pathname)) {
    return <UserLayout {...props} />;
  }
  return <BasicLayout {...props} />;
};