Moved types from old shortUrlsListParams reducer, to the data index file

This commit is contained in:
Alejandro Celaya
2021-12-24 13:47:27 +01:00
parent 275aee4de2
commit d4356ba6e6
9 changed files with 20 additions and 23 deletions

View File

@@ -1,4 +1,5 @@
import { Nullable, OptionalString } from '../../utils/utils';
import { Order } from '../../utils/helpers/ordering';
export interface EditShortUrlData {
longUrl?: string;
@@ -50,3 +51,15 @@ export interface ShortUrlIdentifier {
shortCode: string;
domain: OptionalString;
}
export const SORTABLE_FIELDS = {
dateCreated: 'Created at',
shortCode: 'Short URL',
longUrl: 'Long URL',
title: 'Title',
visits: 'Visits',
};
export type OrderableFields = keyof typeof SORTABLE_FIELDS;
export type ShortUrlsOrder = Order<OrderableFields>;