@@ -108,11 +110,15 @@ export const LeafletListItem = (props: {
);
};
-const LeafletLink = (props: { id: string; children: React.ReactNode }) => {
+const LeafletLink = (props: {
+ id: string;
+ children: React.ReactNode;
+ className: string;
+}) => {
return (
{props.children}
diff --git a/components/Layout.tsx b/components/Layout.tsx
index 52184571..0caa13c9 100644
--- a/components/Layout.tsx
+++ b/components/Layout.tsx
@@ -6,9 +6,7 @@ import { PopoverOpenContext } from "./Popover";
import { useState } from "react";
export const Separator = (props: { classname?: string }) => {
- return (
-
- );
+ return
;
};
export const Menu = (props: {
diff --git a/components/PageLayouts/DashboardLayout.tsx b/components/PageLayouts/DashboardLayout.tsx
index 291e5b31..d44d3eb6 100644
--- a/components/PageLayouts/DashboardLayout.tsx
+++ b/components/PageLayouts/DashboardLayout.tsx
@@ -34,6 +34,7 @@ export type DashboardState = {
published: boolean;
docs: boolean;
templates: boolean;
+ archived: boolean;
};
};
@@ -45,7 +46,13 @@ type DashboardStore = {
const defaultDashboardState: DashboardState = {
display: undefined,
sort: undefined,
- filter: { drafts: false, published: false, docs: false, templates: false },
+ filter: {
+ drafts: false,
+ published: false,
+ docs: false,
+ templates: false,
+ archived: false,
+ },
};
export const useDashboardStore = create
((set, get) => ({
@@ -256,6 +263,7 @@ export const HomeDashboardControls = (props: {
defaultDisplay: Exclude;
hasPubs: boolean;
hasTemplates: boolean;
+ hasArchived: boolean;
}) => {
let { display, sort } = useDashboardState();
display = display || props.defaultDisplay;
@@ -283,6 +291,7 @@ export const HomeDashboardControls = (props: {
{" "}
>
@@ -369,7 +378,11 @@ function Tab(props: {
);
}
-const FilterOptions = (props: { hasPubs: boolean; hasTemplates: boolean }) => {
+const FilterOptions = (props: {
+ hasPubs: boolean;
+ hasTemplates: boolean;
+ hasArchived: boolean;
+}) => {
let { filter } = useDashboardState();
let setState = useSetDashboardState();
let filterCount = Object.values(filter).filter(Boolean).length;
@@ -421,6 +434,20 @@ const FilterOptions = (props: { hasPubs: boolean; hasTemplates: boolean }) => {
>
)}
+
+ {props.hasArchived && (
+
+ setState({
+ filter: { ...filter, archived: !!e.target.checked },
+ })
+ }
+ >
+ Archived
+
+ )}
{
published: false,
drafts: false,
templates: false,
+ archived: false,
},
});
}}