fix: align popular sorting links
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 20s
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 20s
This commit is contained in:
@@ -607,10 +607,7 @@ export function PublicLayout() {
|
|||||||
to={popularHref}
|
to={popularHref}
|
||||||
label={t("popular")}
|
label={t("popular")}
|
||||||
icon="update"
|
icon="update"
|
||||||
active={
|
active={na("browsePopular")}
|
||||||
pathname === "/browse" &&
|
|
||||||
new URLSearchParams(search).get("tag") === "popular"
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export function Home() {
|
|||||||
getJSON<{ items: Post[] }>(`/api/posts/recommended${postQ}&limit=12`),
|
getJSON<{ items: Post[] }>(`/api/posts/recommended${postQ}&limit=12`),
|
||||||
getJSON<{ items: Post[] }>(`/api/posts${postQ}&sort=latest&limit=12`),
|
getJSON<{ items: Post[] }>(`/api/posts${postQ}&sort=latest&limit=12`),
|
||||||
getJSON<{ items: Post[] }>(
|
getJSON<{ items: Post[] }>(
|
||||||
`/api/posts${postQ}&tag=popular&limit=5`,
|
`/api/posts${postQ}&sort=popular&limit=5`,
|
||||||
).catch((): { items: Post[] } => ({ items: [] })),
|
).catch((): { items: Post[] } => ({ items: [] })),
|
||||||
])
|
])
|
||||||
.then(([c, r, l, p]) => {
|
.then(([c, r, l, p]) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user