File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
123123- Added theming to the project
124124- Created single blog post page
125125- Connected Dev.to API with single post UI
126- - Added Shayla to 'about us'
127126
128127### Fixed
129128
@@ -151,10 +150,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
151150- Added Faith to 'about us'
152151- Updated Mariana's title in 'about us'
153152- Updated outdated dependencies
153+ - Added Shayla to 'about us'
154154
155155### Fixed
156156
157157- Updated husky script to avoid warning
158+ - Resolved incorrect meta tag rendering for nested routes
158159
159160### Changed
160161
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import Script from 'next/script';
55
66export default function Meta ( ) {
77 const currentPath = usePathname ( ) ;
8- const firstSegment = '/' + currentPath . split ( '/' ) [ 1 ] ;
8+ const firstSegment = '/' + currentPath . split ( '/' ) [ 1 ] || [ ] ;
99 const meta =
1010 firstSegment in pageMeta ? pageMeta [ firstSegment ] : pageMeta [ '/' ] ;
1111 return (
You can’t perform that action at this time.
0 commit comments