Skip to content

Commit

Permalink
Add query to title
Browse files Browse the repository at this point in the history
Close #4
  • Loading branch information
nonylene committed Jan 8, 2024
1 parent 605d167 commit 8d87739
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/routes/search.pukiwiki/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ import { StatusIndicator } from "~/components/status-indicator";
import { ELASTIC_SEARCH_MAX_SEARCH_WINDOW } from "~/utils";
import { parseSearchParams, setNewOrder, setNewPage } from "~/utils/pukiwiki";

export const meta: MetaFunction = () => {
return [{ title: "PukiWiki - Heineken" }];
export const meta: MetaFunction = ({ location }) => {
const { query } = parseSearchParams(new URLSearchParams(location.search));
return [{ title: `${query ? `${query} - ` : ""}PukiWiki - Heineken` }];
};

export const links: LinksFunction = () => [
Expand Down

0 comments on commit 8d87739

Please sign in to comment.