-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notice-board): integate notice board in about and search pages
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
import PageLayout from 'wrappers/page'; | ||
import Search from 'layouts/search'; | ||
|
||
const SearchPage = () => ( | ||
import PropTypes from 'prop-types'; | ||
|
||
import { getPublishedNotifications } from 'services/notifications'; | ||
|
||
const SearchPage = (props) => ( | ||
<PageLayout | ||
title="Search | Global Forest Watch" | ||
description="Search forest information, including forest data, news, updates and more." | ||
notifications={props.notifications} | ||
noIndex | ||
> | ||
<Search /> | ||
</PageLayout> | ||
); | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
export const getServerSideProps = async ({ params, query, req }) => { | ||
const notifications = await getPublishedNotifications(); | ||
|
||
return { | ||
props: { | ||
notifications: notifications || [], | ||
}, | ||
}; | ||
}; | ||
|
||
SearchPage.propTypes = { | ||
notifications: PropTypes.array, | ||
}; | ||
|
||
export default SearchPage; |