Files
threadcount-community/app/m/(app)/search/page.tsx
T
ThreadCount f72f0626b0
Release / release (push) Has been skipped
ThreadCount Community edition
Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from 794bab5 on 2026-09-16. Licensed under the Functional Source License (FSL-1.1-ALv2).
2026-09-17 05:49:16 +10:00

9 lines
451 B
TypeScript

import { redirect } from "next/navigation";
/* Search became the People tab (stock search is on the Stock tab). The query comes along. */
export default async function Search({ searchParams }: { searchParams: Promise<Record<string, string | string[] | undefined>> }) {
const q = await searchParams;
const term = typeof q.q === "string" ? q.q.trim().slice(0, 80) : "";
redirect(term ? `/m/people?q=${encodeURIComponent(term)}` : "/m/people");
}