fix(bug-link):replace link(router) to achor for external url
This commit is contained in:
@@ -16,11 +16,9 @@ import ReactMarkdown from "react-markdown";
|
||||
import { Link, useNavigate, useParams } from "react-router-dom";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import { toast } from "sonner";
|
||||
|
||||
export default function BlogArticle() {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
const { data } = useBlogById(id);
|
||||
|
||||
const post = data?.data.data;
|
||||
const navigate = useNavigate();
|
||||
// const post = getPostBySlug(id || '');
|
||||
@@ -337,24 +335,24 @@ export default function BlogArticle() {
|
||||
<p className="text-muted-foreground mb-4">{post.author.bio}</p>
|
||||
<div className="flex gap-3 justify-center md:justify-start">
|
||||
{post.author.twitter && (
|
||||
<Link
|
||||
to={`https://twitter.com/${post.author.twitter}`}
|
||||
<a
|
||||
href={`https://twitter.com/${post.author.twitter}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="p-2 rounded-full glass hover:neon-glow transition-all"
|
||||
>
|
||||
<Twitter className="w-5 h-5" />
|
||||
</Link>
|
||||
</a>
|
||||
)}
|
||||
{post.author.linkedin && (
|
||||
<Link
|
||||
to={`https://linkedin.com/in/${post.author.linkedin}`}
|
||||
<a
|
||||
href={`https://linkedin.com/in/${post.author.linkedin}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="p-2 rounded-full glass hover:neon-glow transition-all"
|
||||
>
|
||||
<Linkedin className="w-5 h-5" />
|
||||
</Link>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user