Skip to content

Commit

Permalink
fix bug direct access
Browse files Browse the repository at this point in the history
  • Loading branch information
vabatista committed Mar 29, 2024
1 parent 0ff867f commit eb77a6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { HashRouter, BrowserRouter, Routes, Route } from 'react-router-dom';

import HomePage from './pages/home-page';
import AddBlog from './pages/add-blog';
Expand Down
12 changes: 5 additions & 7 deletions src/pages/details-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ export default function DetailsPage() {
return "";
}
}

const meta = {
title: post.title,
description: 'Blog Viva Viajando ' + getFirstParagraph(post.description),
canonical: window.location.href,
};


useEffect(() => {
const getPostById = async () => {
Expand Down Expand Up @@ -69,6 +62,11 @@ export default function DetailsPage() {
}, [])

if (!loading) {
const meta = {
title: post.title,
description: 'Blog Viva Viajando ' + getFirstParagraph(post.description),
canonical: window.location.href,
};
ReactGA.send({ hitType: "pageview", page: postId, title: post.title });
return (

Expand Down

0 comments on commit eb77a6d

Please sign in to comment.