Commit 6fb458df authored by Andy Lamb's avatar Andy Lamb
Browse files

duplicated and renamed Blog files for AndyTest content/pages

parent c8268816
Pipeline #40597 passed with stage
in 6 minutes and 58 seconds
......@@ -29,7 +29,7 @@ export default [
path: '/andy-test',
exact: true,
component: Loadable({
loader: () => import('~/pages/AndyTestPages/AndyTestPage'),
loader: () => import('~/pages/Listings/AndyTestListing.page'),
loading: Loading,
}),
},
......
import styled, { css } from 'styled-components';
const BlogCardStyled = styled.article`
const AndyListingCardStyled = styled.article`
${() => {
return css`
display: block;
......@@ -30,4 +30,4 @@ const BlogCardStyled = styled.article`
}};
`;
export default BlogCardStyled;
export default AndyListingCardStyled;
import styled, { css } from 'styled-components';
const BlogFiltersStyled = styled.div`
const AndyTestFiltersStyled = styled.div`
${() => {
return css`
@media only screen and (min-width: 1024px) {
......@@ -99,4 +99,4 @@ const BlogFiltersStyled = styled.div`
}};
`;
export default BlogFiltersStyled;
export default AndyTestFiltersStyled;
import styled, { css } from 'styled-components';
const BlogListingStyled = styled.div`
const AndyTestListingStyled = styled.div`
${() => {
return css`
display: flex;
......@@ -35,4 +35,4 @@ const BlogListingStyled = styled.div`
}};
`;
export default BlogListingStyled;
export default AndyTestListingStyled;
......@@ -2,12 +2,12 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import BlogCardStyled from '../components.styled/BlogCard.styled';
import AndyListingCardStyled from '../components.styled/AndyListingCard.styled';
const BlogCard = ({ title, description, image, uri, className }) => {
const AndyListingCard = ({ title, description, image, uri, className }) => {
return (
<Link to={uri}>
<BlogCardStyled className={className}>
<AndyListingCardStyled className={className}>
{image && (
<img
src={`${image.asset.sys.uri}?width=500&height=300&fit=crop`}
......@@ -18,12 +18,12 @@ const BlogCard = ({ title, description, image, uri, className }) => {
<h3>{title}</h3>
{description && <p>{description}</p>}
</BlogCardStyled>
</AndyListingCardStyled>
</Link>
);
};
BlogCard.propTypes = {
AndyListingCard.propTypes = {
className: PropTypes.string,
title: PropTypes.string,
description: PropTypes.string,
......@@ -31,4 +31,4 @@ BlogCard.propTypes = {
uri: PropTypes.string,
};
export default BlogCard;
export default AndyListingCard;
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import BlogFiltersStyled from '../components.styled/BlogFilters.styled';
import AndyTestFiltersStyled from '../components.styled/AndyTestFilters.styled';
import FilterEntryDropdown from '~/features/listings/components/FilterEntryDropdown';
const BlogFilters = ({ className, filters, updateFilters }) => {
const AndyTestFilters = ({ className, filters, updateFilters }) => {
const [filtersVisible, toggleFilters] = useState(false);
const renderFilter = filterGroup => {
......@@ -41,7 +41,10 @@ const BlogFilters = ({ className, filters, updateFilters }) => {
};
return (
<BlogFiltersStyled className={className} filtersVisible={filtersVisible}>
<AndyTestFiltersStyled
className={className}
filtersVisible={filtersVisible}
>
<div className="tfInner">
{filters &&
filters.map((filterGroup, idx) => {
......@@ -60,15 +63,15 @@ const BlogFilters = ({ className, filters, updateFilters }) => {
</button>
</div>
</div>
</BlogFiltersStyled>
</AndyTestFiltersStyled>
);
};
BlogFilters.propTypes = {
AndyTestFilters.propTypes = {
className: PropTypes.string,
clearFilters: PropTypes.func,
filters: PropTypes.array,
updateFilters: PropTypes.func,
};
export default BlogFilters;
export default AndyTestFilters;
......@@ -6,8 +6,8 @@ import { selectVersionStatus } from '~/core/redux/selectors';
import { Op, Query } from 'contensis-delivery-api';
import { cachedSearch } from '~/core/util/ContensisDeliveryApi';
import BlogListingStyled from '../components.styled/BlogListing.styled';
import BlogCard from './BlogCard';
import AndyTestListingStyled from '../components.styled/AndyTestListing.styled';
import AndyListingCard from './AndyListingCard';
const fetchEntries = async versionStatus => {
const triggerSearch = async versionStatus => {
......@@ -57,7 +57,7 @@ const BlogListing = ({ className }) => {
//DELIVERY API PAGING INFO END//
return (
<BlogListingStyled className={className}>
<AndyTestListingStyled className={className}>
{resultsInfo && (
<div
className="resultsInfo"
......@@ -70,7 +70,7 @@ const BlogListing = ({ className }) => {
results.items &&
results.items.map((entry, idx) => {
return (
<BlogCard
<AndyListingCard
title={entry.title}
description={entry.summary}
image={entry.image}
......@@ -81,7 +81,7 @@ const BlogListing = ({ className }) => {
})}
{!results || (results.length < 1 && <p>No results found.</p>)}
{/* DELIVERY API RENDER ENTRIES END */}
</BlogListingStyled>
</AndyTestListingStyled>
);
};
......
......@@ -17,7 +17,9 @@ const BlogRecord = ({ className, entry }) => {
<div className="eventContent">
<h1 className="pageTitle">{entry.entryTitle}</h1>
{entry.content && <ContentComposer composer={entry.postContent} />}
{entry.postContent && (
<ContentComposer composer={entry.postContent} />
)}
</div>
</div>
</BlogRecordStyled>
......
......@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import ContentComposerStyled from '../components.styled/Composer.styled';
import ContactDetails from '~/features/contactDetails/ContactDetails';
// import ContactDetails from '~/features/contactDetails/ContactDetails';
const ContentComposer = ({ className, composer }) => {
if (!composer) return null;
......
import React from 'react';
import PropTypes from 'prop-types';
import MainLayout from '~/layouts/Main.layout';
import AndyTestListing from '~/features/andyTest/components/AndyTestListing';
const AndyTestListingPage = () => {
return (
<MainLayout>
<h1 className="pageTitle">Andy Test Page Listing</h1>
<AndyTestListing />
</MainLayout>
);
};
AndyTestListingPage.propTypes = {
entry: PropTypes.object,
};
export default AndyTestListingPage;
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