Claire 217e0f87fd [Glitch] Change design of lists in web UI
Port 62603508c7343f0b9ef880bcbed67c70a9e8375d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2024-11-24 19:59:23 +01:00

19 lines
473 B
TypeScript

import type { RecordOf } from 'immutable';
import { Record } from 'immutable';
import type { ApiListJSON } from 'flavours/glitch/api_types/lists';
type ListShape = Required<ApiListJSON>; // no changes from server shape
export type List = RecordOf<ListShape>;
const ListFactory = Record<ListShape>({
id: '',
title: '',
exclusive: false,
replies_policy: 'list',
});
export function createList(attributes: Partial<ListShape>) {
return ListFactory(attributes);
}