Commit 888c51f4 authored by Jon Moore's avatar Jon Moore
Browse files

Example removed from all components

parent 37775217
Pipeline #39467 passed with stage
in 2 minutes and 52 seconds
...@@ -13,10 +13,10 @@ export default [ ...@@ -13,10 +13,10 @@ export default [
}), }),
}, },
{ {
contentTypeID: 'exampleCT', contentTypeID: 'blogPost',
component: Loadable({ component: Loadable({
loader: () => { loader: () => {
return import('~/pages/Examples/ExamplePage'); return import('~/pages/Blogs/BlogPost');
}, },
loading: Loading, loading: Loading,
}), }),
......
import React, { useState } from 'react'; import React, { useState } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ExampleFiltersStyled from '../components.styled/BlogFilters.styled'; import BlogFiltersStyled from '../components.styled/BlogFilters.styled';
import FilterEntryDropdown from '~/features/listings/components/FilterEntryDropdown'; import FilterEntryDropdown from '~/features/listings/components/FilterEntryDropdown';
...@@ -41,7 +41,7 @@ const BlogFilters = ({ className, filters, updateFilters }) => { ...@@ -41,7 +41,7 @@ const BlogFilters = ({ className, filters, updateFilters }) => {
}; };
return ( return (
<ExampleFiltersStyled className={className} filtersVisible={filtersVisible}> <BlogFiltersStyled className={className} filtersVisible={filtersVisible}>
<div className="tfInner"> <div className="tfInner">
{filters && {filters &&
filters.map((filterGroup, idx) => { filters.map((filterGroup, idx) => {
...@@ -60,7 +60,7 @@ const BlogFilters = ({ className, filters, updateFilters }) => { ...@@ -60,7 +60,7 @@ const BlogFilters = ({ className, filters, updateFilters }) => {
</button> </button>
</div> </div>
</div> </div>
</ExampleFiltersStyled> </BlogFiltersStyled>
); );
}; };
......
import React, { useState } from 'react'; import React, { useState } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ExampleFiltersStyled from '../components.styled/EventFilters.styled'; import EventFiltersStyled from '../components.styled/EventFilters.styled';
import FilterEntryDropdown from '~/features/listings/components/FilterEntryDropdown'; import FilterEntryDropdown from '~/features/listings/components/FilterEntryDropdown';
...@@ -41,7 +41,7 @@ const EventFilters = ({ className, filters, updateFilters }) => { ...@@ -41,7 +41,7 @@ const EventFilters = ({ className, filters, updateFilters }) => {
}; };
return ( return (
<ExampleFiltersStyled className={className} filtersVisible={filtersVisible}> <EventFiltersStyled className={className} filtersVisible={filtersVisible}>
<div className="tfInner"> <div className="tfInner">
{filters && {filters &&
filters.map((filterGroup, idx) => { filters.map((filterGroup, idx) => {
...@@ -60,7 +60,7 @@ const EventFilters = ({ className, filters, updateFilters }) => { ...@@ -60,7 +60,7 @@ const EventFilters = ({ className, filters, updateFilters }) => {
</button> </button>
</div> </div>
</div> </div>
</ExampleFiltersStyled> </EventFiltersStyled>
); );
}; };
......
import React from 'react'; import React from 'react';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';
import BlogCard from '~/features/blogListing/components/BlogCard'; import EventCard from '~/features/eventListing/components/EventCard';
import { text } from '@storybook/addon-knobs'; import { text } from '@storybook/addon-knobs';
storiesOf('Features | Listings', module).add( storiesOf('Features | Listings', module).add(
'Example card', 'Event card',
() => { () => {
return ( return (
<BlogCard <EventCard
title={text('Title', 'Example title')} title={text('Title', 'Example title')}
description={text('Description', 'Example description')} description={text('Description', 'Example description')}
uri={text('URI', '/example-content/example-article')} uri={text('URI', '/events/example-event')}
/> />
); );
}, },
......
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import MainLayout from '~/layouts/Main.layout'; import MainLayout from '~/layouts/Main.layout';
import ExampleRecord from '~/features/blogListing/components/BlogRecord'; import BlogRecord from '~/features/blogListing/components/BlogRecord';
import { Loading } from '~/core/routes/Loading'; import { Loading } from '~/core/routes/Loading';
const ExamplePage = ({ entry }) => { const BlogPost = ({ entry }) => {
if (!entry) return <Loading />; if (!entry) return <Loading />;
return ( return (
<MainLayout> <MainLayout>
<ExampleRecord entry={entry} /> <BlogRecord entry={entry} />
</MainLayout> </MainLayout>
); );
}; };
ExamplePage.propTypes = { BlogPost.propTypes = {
entry: PropTypes.object, entry: PropTypes.object,
}; };
export default ExamplePage; export default BlogPost;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment