noogle/models/internals.ts
Johannes Kirschbauer 8679af38a2
feature/deeplinks
* add: deeplinks
* add: enhanced pagination for large datasets
* add more meta tags
* add data to initial state
* remove preview page, instead link directly into the list
2023-01-24 21:02:17 +01:00

28 lines
588 B
TypeScript

import { data } from "./data";
import { MetaData, NixType } from "./nix";
export type ComputedState = {
FOTD: boolean;
}
export type PageState = {
data: MetaData;
selected: string | null;
term: string;
filter: Filter;
page: number;
itemsPerPage: number;
} & ComputedState;
export type InitialPageState = Omit<PageState, keyof ComputedState>;
export const initialPageState: InitialPageState = {
data,
selected: null,
term: "",
filter: { from: "any", to: "any" },
page: 1,
itemsPerPage: 10,
};
export type Filter = { to: NixType; from: NixType };