File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 168168 }
169169 ]
170170 },
171- {
171+ {
172172 "name" : " Gallery" ,
173173 "path" : " /gallery"
174174 },
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import advancedFormat from 'dayjs/plugin/advancedFormat'
1818import { getImageFromFileNode } from '../utils/utils' ;
1919import { GatsbyImage } from 'gatsby-plugin-image' ;
2020import 'react-photo-view/dist/react-photo-view.css' ;
21- import { PhotoProvider , PhotoView } from 'react-photo-view' ;
2221
2322dayjs . extend ( utc ) ;
2423dayjs . extend ( timezone ) ;
@@ -41,14 +40,17 @@ interface DataProps {
4140 * metadata and details about the event.
4241 */
4342const GalleryPage : React . FC < PageProps < DataProps > > = ( { data } ) => {
44- console . log ( data ) ;
4543 const allItems = data . allMdx . nodes . map ( d => {
4644 if ( d . frontmatter . primaryImage ) {
4745 d . frontmatter . primaryImageData = getImageFromFileNode ( d . frontmatter . primaryImage ) ;
4846 }
4947 return d ;
5048 } ) ;
5149
50+ allItems . sort ( ( a , b ) => {
51+ return a . frontmatter . title . localeCompare ( b . frontmatter . title ) ;
52+ } ) ;
53+
5254 return (
5355 < BaseLayout >
5456 < PageHeader >
You can’t perform that action at this time.
0 commit comments