From 95fe73f0bf90826f3851f465770793761f5679d0 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 1 Dec 2025 09:12:14 -0800 Subject: [PATCH 1/2] fix(farwell): remove press section --- clients/web/src/containers/farewell/farewell.js | 11 ----------- clients/web/src/containers/farewell/style.module.css | 1 + 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/clients/web/src/containers/farewell/farewell.js b/clients/web/src/containers/farewell/farewell.js index 45eb12711..4888f1392 100644 --- a/clients/web/src/containers/farewell/farewell.js +++ b/clients/web/src/containers/farewell/farewell.js @@ -121,17 +121,6 @@ export function Farewell() { - -
- -

Thank you for being a part of this journey

-
-

- Contact us for press inquiries at{' '} - press@getpocket.com. -

-
-
) diff --git a/clients/web/src/containers/farewell/style.module.css b/clients/web/src/containers/farewell/style.module.css index b6d6c939c..f8e3cc832 100644 --- a/clients/web/src/containers/farewell/style.module.css +++ b/clients/web/src/containers/farewell/style.module.css @@ -76,6 +76,7 @@ } &.whatsNext { + margin-bottom: 10rem; grid-template-columns: 1fr 1fr 1fr; align-items: flex-start; @media (max-width: 1024px) { From 8718f8ab3c3e9290e6f2f0851cd694f99fcbbb30 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 1 Dec 2025 09:35:04 -0800 Subject: [PATCH 2/2] fix(collections): remove defunct collections --- clients/web/src/pages/collections/[slug].js | 57 --------------- clients/web/src/pages/collections/index.js | 41 ----------- .../pages/collections/page/[pagenumber].js | 72 ------------------- 3 files changed, 170 deletions(-) delete mode 100644 clients/web/src/pages/collections/[slug].js delete mode 100644 clients/web/src/pages/collections/index.js delete mode 100644 clients/web/src/pages/collections/page/[pagenumber].js diff --git a/clients/web/src/pages/collections/[slug].js b/clients/web/src/pages/collections/[slug].js deleted file mode 100644 index a95cb85b8..000000000 --- a/clients/web/src/pages/collections/[slug].js +++ /dev/null @@ -1,57 +0,0 @@ -import { CollectionPage } from 'containers/collections/stories-page/stories-page' -import { getCollectionsSlugs } from 'common/api/queries/get-collections' -import { fetchCollectionBySlug } from 'containers/collections/stories-page/stories.state' -import { hydrateStoryPage } from 'containers/collections/stories-page/stories.state' -import { hydrateItems } from 'connectors/items/items-display.state' -import { serverSideTranslations } from 'next-i18next/serverSideTranslations' -import { LOCALE_COMMON } from 'common/constants' -import { END } from 'redux-saga' -import { wrapper } from 'store' - -/** - * Server Side State Hydration - * This is where we are defining initial state for this page. - * Await on async calls here will block the page loading - * until they are resolved, which is fine if we need the data for - * SEO/Crawlers - --------------------------------------------------------------- */ -export const getStaticPaths = async () => { - const { slugs = [] } = await getCollectionsSlugs() - const paths = slugs.map((slug) => `/collections/${slug}`) - - return { paths, fallback: 'blocking' } -} - -export const getStaticProps = wrapper.getStaticProps((store) => async ({ params, locale }) => { - const { dispatch, sagaTask } = store - const { slug } = params - - const defaultProps = { - ...(await serverSideTranslations(locale, [...LOCALE_COMMON])), - slug, - locale - } - - // Hydrating initial state with an async request. This will block the - // page from loading. Do this for SEO/crawler purposes - const response = await fetchCollectionBySlug({ slug }) - const { itemsById, storyIdsBySlug } = response || {} - - // No article found - if (!itemsById) { - return { props: { ...defaultProps, statusCode: 404 }, revalidate: 60 } - } - - // Since ssr will not wait for side effects to resolve this dispatch needs to be pure - dispatch(hydrateItems(itemsById)) - dispatch(hydrateStoryPage(storyIdsBySlug)) - - // end the saga - dispatch(END) - await sagaTask.toPromise() - - // Revalidate means this can be regenerated once every X seconds - return { props: defaultProps, revalidate: 60 } -}) - -export default CollectionPage diff --git a/clients/web/src/pages/collections/index.js b/clients/web/src/pages/collections/index.js deleted file mode 100644 index 43cbef7d7..000000000 --- a/clients/web/src/pages/collections/index.js +++ /dev/null @@ -1,41 +0,0 @@ -import Collections from 'containers/collections/collections' - -import { fetchCollections } from 'containers/collections/collections.state' -import { hydrateCollections } from 'containers/collections/collections.state' -import { hydrateItems } from 'connectors/items/items-display.state' - -import { serverSideTranslations } from 'next-i18next/serverSideTranslations' -import { LOCALE_COMMON } from 'common/constants' -import { END } from 'redux-saga' -import { wrapper } from 'store' - -export const getStaticProps = wrapper.getStaticProps((store) => async ({ locale }) => { - const { dispatch, sagaTask } = store - - const defaultProps = { - ...(await serverSideTranslations(locale, [...LOCALE_COMMON])), - locale - } - - const labels = locale === 'en-KE' ? ['region-east-africa'] : ['collections-homepage'] - - // Hydrating initial state with an async request. This will block the - // page from loading. Do this for SEO/crawler purposes - const { itemsBySlug, itemSlugs, pagination } = await fetchCollections(locale, labels) - - // No articles found - if (!itemsBySlug) return { props: { ...defaultProps }, notFound: true, revalidate: 60 } - const { totalResults, perPage, currentPage } = pagination || 0 - - // Since ssr will not wait for side effects to resolve this dispatch needs to be pure - dispatch(hydrateCollections(itemSlugs)) - dispatch(hydrateItems(itemsBySlug)) - // end the saga - dispatch(END) - await sagaTask.toPromise() - - // Revalidate means this can be regenerated once every X seconds - return { props: { ...defaultProps, totalResults, perPage, currentPage }, revalidate: 60 } -}) - -export default Collections diff --git a/clients/web/src/pages/collections/page/[pagenumber].js b/clients/web/src/pages/collections/page/[pagenumber].js deleted file mode 100644 index 91af58835..000000000 --- a/clients/web/src/pages/collections/page/[pagenumber].js +++ /dev/null @@ -1,72 +0,0 @@ -import Collections from 'containers/collections/collections' - -import { fetchCollectionPageCount } from 'containers/collections/collections.state' -import { fetchCollections } from 'containers/collections/collections.state' -import { hydrateCollections } from 'containers/collections/collections.state' -import { hydrateItems } from 'connectors/items/items-display.state' - -import { serverSideTranslations } from 'next-i18next/serverSideTranslations' -import { LOCALE_COMMON } from 'common/constants' -import { END } from 'redux-saga' -import { wrapper } from 'store' - -export const getStaticPaths = async () => { - //We are only gonna paginate items with the label `collections-homepage` - const totalPages = await fetchCollectionPageCount('en', ['collections-homepage']) - - // We don't want the first page to be part of the pagination - const pagesToPaginate = totalPages - 1 - - // Create an array for use to map through and build an array of URLs - const paths = Array(pagesToPaginate) - .fill(0) - .map((content, pageNumber) => `/collections/page/${pageNumber}`) - .slice(1, -1) - - return { paths, fallback: 'blocking' } -} - -export const getStaticProps = wrapper.getStaticProps((store) => async ({ params, locale }) => { - const { dispatch, sagaTask } = store - const { pagenumber: passedNumber } = params - const pageNumber = parseInt(passedNumber, 10) - - const defaultProps = { - ...(await serverSideTranslations(locale, [...LOCALE_COMMON])), - locale, - noIndex: true - } - - // Hydrating initial state with an async request. This will block the - // page from loading. Do this for SEO/crawler purposes - const { itemsBySlug, itemSlugs, pagination } = await fetchCollections( - 'en', - ['collections-homepage'], - pageNumber - ) - const { totalResults, perPage, currentPage } = pagination || 0 - - // No article found - if (!itemSlugs.length) return { props: defaultProps, notFound: true, revalidate: 60 } - - // Since ssr will not wait for side effects to resolve this dispatch needs to be pure - dispatch(hydrateCollections(itemSlugs)) - dispatch(hydrateItems(itemsBySlug)) - - // end the saga - dispatch(END) - await sagaTask.toPromise() - - // Revalidate means this can be regenerated once every X seconds - return { - props: { - ...defaultProps, - totalResults, - perPage, - currentPage - }, - revalidate: 60 - } -}) - -export default Collections