diff --git a/.env.local.sample b/.env.local.sample new file mode 100644 index 0000000..ab2abcf --- /dev/null +++ b/.env.local.sample @@ -0,0 +1,19 @@ + +#create environment file name as .env.local +#and place following configuration data. + +CONTENTSTACK_API_KEY=YOUR_API_KEY +CONTENTSTACK_DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN +CONTENTSTACK_ENVIRONMENT=YOUR_PUBLISHING_ENVIRONMENT + +# For live preview +CONTENTSTACK_MANAGEMENT_TOKEN= +CONTENTSTACK_API_HOST= +CONTENTSTACK_APP_HOST= +CONTENTSTACK_LIVE_PREVIEW=true + +# For enabling live editing tags for this project set NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW=true by default it is set to false +# For NA region add CONTENTSTACK_APP_HOST=app.contentstack.com +# For EU region add CONTENTSTACK_APP_HOST=eu-app.contentstack.com +# For setting region add CONTENTSTACK_REGION=(Optional for US region) Eg- eu +# For setting custom host add CONTENTSTACK_API_HOST=for(NA: api.contentstack.io, EU: eu-api.contentstack.com) \ No newline at end of file diff --git a/.env.sample b/.env.sample deleted file mode 100644 index 97d62fe..0000000 --- a/.env.sample +++ /dev/null @@ -1,10 +0,0 @@ - -#create environment file name as .env.development.local,.env.production.local -#and place following configuration data. - -CONTENTSTACK_API_KEY=YOUR_API_KEY -CONTENTSTACK_DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN -CONTENTSTACK_ENVIRONMENT=YOUR_PUBLISHING_ENVIRONMENT - -# For setting region add CONTENTSTACK_REGION=(Optional for US region) Eg- eu -# For setting custom host add CONTENTSTACK_CUSTOM_HOST=(Optional) \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3225e7a..184b426 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,8 +24,10 @@ module.exports = { "func-names": ["error", "never"], quotes: "off", "prop-types": "off", + camelcase: "off", "no-continue": "off", "guard-for-in": "off", + "no-unused-vars": "off", "global-require": "off", "no-param-reassign": "off", "prettier/prettier": "off", @@ -33,9 +35,12 @@ module.exports = { "no-unused-expressions": "off", "no-restricted-syntax": "off", "react/no-array-index-key": "off", + "react/react-in-jsx-scope": "off", "jsx-a11y/anchor-is-valid": "off", + "import/prefer-default-export": "off", + "react/jsx-props-no-spreading": "off", "react/destructuring-assignment": "off", + "eslint-disable prefer-destructuring": "off", "jsx-a11y/label-has-associated-control": "off", - "eslint-disable-next-line jsx-a11y/anchor-is-valid": "off", }, }; diff --git a/components/about-section-bucket.js b/components/about-section-bucket.js index 1aecff8..5d0417f 100644 --- a/components/about-section-bucket.js +++ b/components/about-section-bucket.js @@ -1,5 +1,5 @@ -import React from "react"; -import parse from "html-react-parser"; +import React from 'react'; +import parse from 'html-react-parser'; export default function AboutSectionBucket(props) { const { sectionWithBuckets } = props; @@ -7,12 +7,23 @@ export default function AboutSectionBucket(props) { return (
{card.description}
} + {card.description && ( +{card.description}
+ )}- {banner.banner_description} + {banner?.banner_description}
) : ( "" )} {banner.call_to_action.title && banner.call_to_action.href ? ( - - {banner.call_to_action.title} + + {banner?.call_to_action.title} ) : ( "" )}{section.description}
}{section.description}
} - {section.call_to_action.title - && section.call_to_action.href ? ( - - {section.call_to_action.title} + {section.title_h2 && ( +{section.description}
+ )} + {section.call_to_action.title && section.call_to_action.href ? ( + + + {section.call_to_action.title} + - ) : ( - "" - )} + ) : ( + '' + )}{ourTeam.description}
: ""} + {ourTeam.title_h2 && ( +{ourTeam.description}
+ ) : ( + '' + )}{employee.designation}
} + {employee.designation && ( +{employee.designation}
+ )}- {moment(result.date).format("ddd, MMM D YYYY")},{" "} - {result.author[0].title} + {moment(getEntry.date).format('ddd, MMM D YYYY')} + , + {' '} + {getEntry.author[0].title}
- {typeof result.body === "string" && parse(result.body)} + {typeof getEntry.body === 'string' && parse(getEntry.body)}- {moment(bloglist.date).format("ddd, MMM D YYYY")} + {moment(bloglist.date).format('ddd, MMM D YYYY')} , - {" "} + {' '} {bloglist.author[0].title}
- {typeof bloglist.body === "string" + {typeof bloglist.body === 'string' && parse(bloglist.body.slice(0, 300))} {bloglist.url ? ( - {"Read more -->"} + {'Read more -->'} ) : ( - "" + '' )}