Skip to content

Commit

Permalink
fix(antdsite): fix page context export path.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyi7099 committed Jul 31, 2019
1 parent d85b0ed commit f5907ab
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/antdsite/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { PageContext } from './templates/PageContext';
export { PageContext } from './src/templates/PageContext';
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import EditButton from './EditButton';
import { OneToc } from '../../../templates';
import moment from 'moment';
import AvatarList from './AvatarList';
import { PageContext } from 'antdsite/src/templates/PageContext';
import { PageContext } from 'antdsite';
import SEO from '../SEO/SEO';
import MDXRenderer from 'gatsby-mdx-fix/mdx-renderer';

Expand Down
2 changes: 1 addition & 1 deletion packages/antdsite/src/default-theme/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { Link } from 'gatsby';
import * as utils from '../components/utils';
import { Row, Col, Icon, Input, Menu, Button, Popover, Dropdown, Affix, Badge } from 'antd';
import { PageContext } from 'antdsite/src/templates/PageContext';
import { PageContext } from 'antdsite';
import SearchBox from '../components/search-box';

interface HeaderProps {
Expand Down
4 changes: 2 additions & 2 deletions packages/antdsite/src/default-theme/layout/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import SEO from '../components/SEO/SEO';
import Banner from '../components/home/Banner.jsx';
import Features from '../components/home/Features.jsx';
import HomeRest from '../components/home/HomeRest.jsx';
import { PageContext } from 'antdsite/src/templates/PageContext';
import { PageContext } from 'antdsite';

function Home(props: any) {
return (
<PageContext.Consumer>
{value => {
{(value: any) => {
const { currentLocaleWebConfig } = value;
const { title, description } = currentLocaleWebConfig as any;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import classNames from 'classnames';
import MobileMenu from 'rc-drawer';
import Article from '../components/content/Article';
import { PageInfo, getPageTitle } from '../components/utils';
import { PageContext } from 'antdsite/src/templates/PageContext';
import { PageContext } from 'antdsite';

const { SubMenu } = Menu;

Expand Down
1 change: 1 addition & 0 deletions packages/antdsite/src/module.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
declare module '*.less';
declare module 'gatsby-mdx-fix/mdx-renderer';
declare module 'antdsite';
declare module '*.jsx';

0 comments on commit f5907ab

Please sign in to comment.