@@ -20,7 +20,6 @@ exports.createPages = ({graphql, boundActionCreators}) => {
20
20
edges {
21
21
node {
22
22
displayName
23
- isPublic
24
23
docblock
25
24
description {
26
25
text
@@ -53,7 +52,7 @@ exports.createPages = ({graphql, boundActionCreators}) => {
53
52
54
53
result . data . allComponentMetadata . edges . map ( ( { node} ) => {
55
54
createPage ( {
56
- path : `/docs/${ node . isPublic ? 'public/' : '' } ${ node . displayName } ` ,
55
+ path : `/docs/${ node . displayName } ` ,
57
56
component : path . resolve ( './src/templates/component.js' ) ,
58
57
context : {
59
58
// Data passed to context is available in page queries as GraphQL variables.
@@ -67,26 +66,27 @@ exports.createPages = ({graphql, boundActionCreators}) => {
67
66
} ) ;
68
67
} ;
69
68
70
- exports . setFieldsOnGraphQLNodeType = ( { type} ) => {
71
- if ( type . name === 'ComponentMetadata' ) {
72
- const componentsByGroups = _ . groupBy ( type . nodes , 'displayName' ) ;
73
- _ . forEach ( componentsByGroups , group => {
74
- // has public origin
75
- if ( group . length === 2 ) {
76
- publicComponentsIds . push ( _ . last ( group ) . id ) ;
77
- }
78
- } ) ;
69
+ // We don't need this in public docs
70
+ // exports.setFieldsOnGraphQLNodeType = ({type}) => {
71
+ // if (type.name === 'ComponentMetadata') {
72
+ // const componentsByGroups = _.groupBy(type.nodes, 'displayName');
73
+ // _.forEach(componentsByGroups, group => {
74
+ // // has public origin
75
+ // if (group.length === 2) {
76
+ // publicComponentsIds.push(_.last(group).id);
77
+ // }
78
+ // });
79
79
80
- return {
81
- isPublic : {
82
- type : GraphQLBoolean ,
80
+ // return {
81
+ // isPublic: {
82
+ // type: GraphQLBoolean,
83
83
84
- resolve : source => {
85
- return _ . includes ( publicComponentsIds , source . id ) ;
86
- } ,
87
- } ,
88
- } ;
89
- }
84
+ // resolve: source => {
85
+ // return _.includes(publicComponentsIds, source.id);
86
+ // },
87
+ // },
88
+ // };
89
+ // }
90
90
91
- return { } ;
92
- } ;
91
+ // return {};
92
+ // };
0 commit comments