This commit is contained in:
Nicholas Orlowsky 2023-03-31 00:02:48 -05:00
commit 204baf9db9
No known key found for this signature in database
GPG key ID: 58832FD3AC16C706

View file

@ -13,7 +13,8 @@ function SingleBlog() {
const [blogText, setBlogText] = useState<string>('');
useEffect(()=> {
let blogName = window.location.pathname.split('/').at(-1);
let pathParts = window.location.pathname.split('/');
let blogName = pathParts[pathParts.length - 1];
setBlog(AllBlogs.find(b => b.uri == blogName));
}, [])