We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f76f40 commit b3782bbCopy full SHA for b3782bb
src/utils/url.utils.ts
@@ -1,6 +1,6 @@
1
export const getNewsIdFromUrl = () => {
2
const pathname = window.location.pathname;
3
- const [, , newsId] = pathname.split('/');
+ const newsId = pathname.split('/')[-1];
4
5
return newsId ? { newsFlashId: +newsId } : { pageNumber: 1 };
6
};
0 commit comments