1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Issue-#545: Add try-catch block

This commit is contained in:
Akshay 2021-09-13 22:41:43 +02:00
parent 81faf61201
commit efb1b20e6d

View File

@ -179,13 +179,19 @@ exports.createPages = ({ graphql, actions }) => {
}
const createSearchPage = async (createPage) => {
const template = path.resolve('./src/components/Search/SearchComponent.jsx')
const slug = `/search/`
try {
const pageTemplate = path.resolve(
'./src/components/Search/SearchComponent.jsx'
)
const url = `/search/`
createPage({
path: slug,
component: template
})
createPage({
path: pageTemplate,
component: url
})
} catch (error) {
console.log(error.message)
}
}
const createDeploymentsPage = async (createPage) => {