1
0
mirror of synced 2025-12-23 11:54:18 -05:00

Enable more react pages (#19935)

* enable more react landing pages

* move nextjs page logic to separate middleware

* enable codespaces landing page + fixes

* enable /education

* enable /admin

* use pathToRegexp to match routes for react rendering

* run lint

* fix: typo in url

* update sidebar test
This commit is contained in:
Mike Surowiec
2021-06-15 13:31:17 -07:00
committed by GitHub
parent 5be19d432c
commit 306f6fc75e
9 changed files with 71 additions and 31 deletions

View File

@@ -4,6 +4,7 @@ import { ArrowRightIcon, SearchIcon } from '@primer/octicons-react'
import { useProductLandingContext } from 'components/context/ProductLandingContext'
import { useTranslation } from 'components/hooks/useTranslation'
import { CodeExampleCard } from 'components/landing/CodeExampleCard'
import { Link } from 'components/Link'
const PAGE_SIZE = 6
export const CodeExamples = () => {
@@ -60,19 +61,19 @@ export const CodeExamples = () => {
)}
{isSearching && searchResults.length === 0 && (
<div className="d-none py-4 text-center color-text-secondary font-mktg">
<div className="py-4 text-center color-text-secondary font-mktg">
<div className="mb-3">
<SearchIcon size={24} />{' '}
</div>
<h3 className="text-normal">
{t('sorry')} <strong className="js-filter-card-value"></strong>
{t('sorry')} <strong>{search}</strong>
</h3>
<p className="my-3 f4">
{t('no_example')} <br /> {t('try_another')}
</p>
<a href="https://github.com/github/docs/blob/main/data/variables/discussions_community_examples.yml">
{t('add_your_community')} <ArrowRightIcon />
</a>
<Link href="https://github.com/github/docs/blob/main/data/variables/actions_code_examples.yml">
{t('learn')} <ArrowRightIcon />
</Link>
</div>
)}
</div>