fix(website): only show blog drafts when explicitly requested
The validateSearch round-trip caused drafts to always show because `false !== undefined` is true. Check for explicit truthy values instead.
This commit is contained in:
@@ -4,7 +4,7 @@ import { pageMeta } from "~/meta";
|
||||
|
||||
export const Route = createFileRoute("/blog/")({
|
||||
validateSearch: (search: Record<string, unknown>) => ({
|
||||
drafts: search.drafts !== undefined,
|
||||
drafts: search.drafts === true || search.drafts === "" || search.drafts === "true",
|
||||
}),
|
||||
head: () => ({
|
||||
meta: pageMeta("Blog - Paseo", "Updates, thoughts, and announcements from the Paseo team."),
|
||||
|
||||
Reference in New Issue
Block a user