mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
added type for statusFilter
This commit is contained in:
@ -27,7 +27,13 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
|
|||||||
const [filteredDocuments, setFilteredDocuments] = useState([]);
|
const [filteredDocuments, setFilteredDocuments] = useState([]);
|
||||||
|
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const statusFilters = [
|
|
||||||
|
type statusFilterType = {
|
||||||
|
label: string;
|
||||||
|
value: DocumentStatus | "ALL";
|
||||||
|
};
|
||||||
|
|
||||||
|
const statusFilters: statusFilterType[] = [
|
||||||
{ label: "All", value: "ALL" },
|
{ label: "All", value: "ALL" },
|
||||||
{ label: "Draft", value: "DRAFT" },
|
{ label: "Draft", value: "DRAFT" },
|
||||||
{ label: "Waiting for others", value: "PENDING" },
|
{ label: "Waiting for others", value: "PENDING" },
|
||||||
@ -83,7 +89,7 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
|
|||||||
return filteredDocuments;
|
return filteredDocuments;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSetSelectedStatusFilter(status: any) {
|
function handleSetSelectedStatusFilter(status: statusFilterType) {
|
||||||
router.replace(
|
router.replace(
|
||||||
{
|
{
|
||||||
pathname: router.pathname,
|
pathname: router.pathname,
|
||||||
|
|||||||
Reference in New Issue
Block a user