Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions polaris.shopify.com/content/patterns/resource-index-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ previewImg: /images/patterns/pattern-thumbnail-resource-index.png
order: 10
githubDiscussionsLink: https://github.com/Shopify/polaris/discussions/8215
contentFile: 'resource-index-layout.ts'
hideFromNav: true
draft: true
noIndex: true
---
4 changes: 4 additions & 0 deletions polaris.shopify.com/pages/patterns/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import globby from 'globby';
import matter from 'gray-matter';

import PatternPage from '../../src/components/PatternPage';
import ComingSoon from '../../src/components/ComingSoon';
import {Pattern, PatternFrontMatter} from '../../src/types';

interface Props extends PatternFrontMatter {
Expand Down Expand Up @@ -61,6 +62,7 @@ export const getStaticProps: GetStaticProps<Props, {slug: string[]}> = async ({
return {
props: {
...data,
draft: data.draft || false,
pattern,
},
};
Expand All @@ -80,6 +82,8 @@ export const getStaticPaths: GetStaticPaths = async () => {
};

const PatternsPage: NextPage<Props> = (props: Props) => {
if (props.draft && process.env.NODE_ENV === 'production')
return <ComingSoon />;
return <PatternPage {...props} />;
};

Expand Down
5 changes: 5 additions & 0 deletions polaris.shopify.com/src/components/ComingSoon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Page from '../Page';

export default function ComingSoon() {
return <Page>Coming Soon</Page>;
}
1 change: 1 addition & 0 deletions polaris.shopify.com/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface FrontMatter {
export interface PatternFrontMatter extends FrontMatter {
previewImg?: string;
order?: number;
draft: boolean;
githubDiscussionsLink?: string;
contentFile: string;
}
Expand Down