Added new settings card to customize short URLs lists

This commit is contained in:
Alejandro Celaya
2021-12-24 14:15:28 +01:00
parent d4356ba6e6
commit de32d899bc
10 changed files with 123 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ const ShortUrlsList = (ShortUrlsTable: FC<ShortUrlsTableProps>, SearchBar: FC) =
settings,
}: ShortUrlsListProps) => {
const serverId = getServerId(selectedServer);
const initialOrderBy = settings.shortUrlList?.defaultOrdering ?? DEFAULT_SHORT_URLS_ORDERING;
const initialOrderBy = settings.shortUrlsList?.defaultOrdering ?? DEFAULT_SHORT_URLS_ORDERING;
const [ order, setOrder ] = useState<ShortUrlsOrder>(initialOrderBy);
const [{ tags, search, startDate, endDate }, toFirstPage ] = useShortUrlsQuery({ history, match, location });
const selectedTags = useMemo(() => tags?.split(',') ?? [], [ tags ]);