File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 "react-datepicker" : " ^4.8.0" ,
7272 "react-dom" : " 18.2.0" ,
7373 "react-error-boundary" : " 3.1.4" ,
74- "react-helsinki-headless-cms" : " 1.0.0-alpha151 " ,
74+ "react-helsinki-headless-cms" : " 1.0.0-alpha154 " ,
7575 "react-i18next" : " 12.2.0" ,
7676 "react-scroll" : " ^1.8.7" ,
7777 "react-toastify" : " ^9.0.3" ,
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ export default function ArticleArchive({
6565 networkStatus,
6666 } = usePostsQuery ( {
6767 notifyOnNetworkStatusChange : true ,
68+ // does not work without fetchPolicy: 'network-only',
69+ fetchPolicy : 'network-only' ,
70+ // not sure if nextFetchPolicy is needed
71+ nextFetchPolicy : 'cache-first' ,
6872 variables : {
6973 first : BLOCK_SIZE ,
7074 search : debouncedSearchTerm ?? '' ,
Original file line number Diff line number Diff line change 7171 "react-datepicker" : " ^4.8.0" ,
7272 "react-dom" : " 18.2.0" ,
7373 "react-error-boundary" : " 3.1.4" ,
74- "react-helsinki-headless-cms" : " 1.0.0-alpha151 " ,
74+ "react-helsinki-headless-cms" : " 1.0.0-alpha154 " ,
7575 "react-i18next" : " 12.2.0" ,
7676 "react-scroll" : " ^1.8.7" ,
7777 "react-toastify" : " ^9.0.3" ,
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ export default function ArticleArchive({
6565 networkStatus,
6666 } = usePostsQuery ( {
6767 notifyOnNetworkStatusChange : true ,
68+ // does not work without fetchPolicy: 'network-only',
69+ fetchPolicy : 'network-only' ,
70+ // not sure if nextFetchPolicy is needed
71+ nextFetchPolicy : 'cache-first' ,
6872 variables : {
6973 first : BLOCK_SIZE ,
7074 search : debouncedSearchTerm ?? '' ,
Original file line number Diff line number Diff line change 7979 "react-datepicker" : " ^4.8.0" ,
8080 "react-dom" : " 18.2.0" ,
8181 "react-error-boundary" : " 3.1.4" ,
82- "react-helsinki-headless-cms" : " 1.0.0-alpha151 " ,
82+ "react-helsinki-headless-cms" : " 1.0.0-alpha154 " ,
8383 "react-i18next" : " 12.2.0" ,
8484 "react-leaflet" : " 4.2.0" ,
8585 "react-scroll" : " ^1.8.7" ,
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ export default function ArticleArchive({
6565 networkStatus,
6666 } = usePostsQuery ( {
6767 notifyOnNetworkStatusChange : true ,
68+ // does not work without fetchPolicy: 'network-only',
69+ fetchPolicy : 'network-only' ,
70+ // not sure if nextFetchPolicy is needed
71+ nextFetchPolicy : 'cache-first' ,
6872 variables : {
6973 first : BLOCK_SIZE ,
7074 search : debouncedSearchTerm ?? '' ,
Original file line number Diff line number Diff line change 7171 "react-datepicker" : " ^4.8.0" ,
7272 "react-dom" : " 18.2.0" ,
7373 "react-error-boundary" : " 3.1.4" ,
74- "react-helsinki-headless-cms" : " 1.0.0-alpha151 " ,
74+ "react-helsinki-headless-cms" : " 1.0.0-alpha154 " ,
7575 "react-i18next" : " 12.2.0" ,
7676 "react-leaflet" : " 4.2.0" ,
7777 "react-toastify" : " ^9.0.3" ,
Original file line number Diff line number Diff line change @@ -203,6 +203,8 @@ class EventsFederationApolloClient {
203203 } ;
204204 }
205205 ) ,
206+ // works in combination with fetchPolicy: 'network-only'
207+ posts : relayStylePagination ( excludeArgs ( [ 'after' ] ) ) ,
206208 unifiedSearch : relayStylePagination ( excludeArgs ( [ 'after' ] ) ) ,
207209 } ,
208210 } ,
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const FooterSection: FunctionComponent<FooterSectionProps> = ({
4949 >
5050 { footerMenu ?. menuItems ?. nodes ?. map (
5151 // NOTE: HCRC-build sometimes fails - this type should not be needed.
52- ( navigationItem ) => (
52+ ( navigationItem : Menu [ 'menuItems' ] [ 'nodes' ] [ number ] ) => (
5353 < Footer . Item
5454 className = { styles . footerLink }
5555 key = { navigationItem ?. id }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const getAllArticles = async (
4040 locale : node . language . code . toLowerCase ( ) ,
4141 slug : node . slug ,
4242 } ) ;
43- node . translations ?. forEach ( ( translation ) => {
43+ node . translations ?. forEach ( ( translation : PageType [ 'translations' ] ) => {
4444 if (
4545 translation ?. uri &&
4646 translation . slug &&
@@ -88,7 +88,7 @@ export const getAllPages = async (
8888 locale : node . language . code . toLowerCase ( ) ,
8989 slug : node . slug ,
9090 } ) ;
91- node . translations ?. forEach ( ( translation ) => {
91+ node . translations ?. forEach ( ( translation : PageType [ 'translations' ] ) => {
9292 if (
9393 translation ?. uri &&
9494 translation . slug &&
You can’t perform that action at this time.
0 commit comments