mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:01:42 +08:00
fix: remove unused back url in the card url
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user