fix: remove unused back url in the card url

This commit is contained in:
satnaing
2025-03-08 17:38:30 +07:00
committed by Sat Naing
parent 39ed4898a3
commit 61c6ec81b8
2 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -16,8 +16,6 @@ export const getStaticPaths = (async ({ paginate }) => {
}) satisfies GetStaticPaths;
const { page } = Astro.props;
const backUrl = SITE.showBackButton ? `?from=${Astro.url.pathname}` : "/";
---
<Layout title={`Posts | ${SITE.title}`}>
@@ -26,7 +24,7 @@ const backUrl = SITE.showBackButton ? `?from=${Astro.url.pathname}` : "/";
<ul>
{
page.data.map(({ data, id }) => (
<Card href={`/posts/${id}${backUrl}`} frontmatter={data} />
<Card href={`/posts/${id}`} frontmatter={data} />
))
}
</ul>
+1 -3
View File
@@ -29,8 +29,6 @@ export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
const params = Astro.params;
const { tag } = params;
const { page, tagName } = Astro.props;
const backUrl = SITE.showBackButton ? `?from=${Astro.url.pathname}` : "/";
---
<Layout title={`Tag: ${tagName} | ${SITE.title}`}>
@@ -44,7 +42,7 @@ const backUrl = SITE.showBackButton ? `?from=${Astro.url.pathname}` : "/";
<ul>
{
page.data.map(({ data, id }) => (
<Card href={`/posts/${id}${backUrl}`} frontmatter={data} />
<Card href={`/posts/${id}`} frontmatter={data} />
))
}
</ul>