mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-11 11:05:28 +00:00
Use tabWidth 4 without actual tabs.
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
export interface LastOpened {
|
||||
[key: string]: string;
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
export type LastOpenedAction =
|
||||
| { type: undefined }
|
||||
| {
|
||||
type: "LAST_OPENED_SET";
|
||||
parent: string;
|
||||
child: string;
|
||||
}
|
||||
| {
|
||||
type: "RESET";
|
||||
};
|
||||
| { type: undefined }
|
||||
| {
|
||||
type: "LAST_OPENED_SET";
|
||||
parent: string;
|
||||
child: string;
|
||||
}
|
||||
| {
|
||||
type: "RESET";
|
||||
};
|
||||
|
||||
export function lastOpened(
|
||||
state = {} as LastOpened,
|
||||
action: LastOpenedAction,
|
||||
state = {} as LastOpened,
|
||||
action: LastOpenedAction,
|
||||
): LastOpened {
|
||||
switch (action.type) {
|
||||
case "LAST_OPENED_SET": {
|
||||
return {
|
||||
...state,
|
||||
[action.parent]: action.child,
|
||||
};
|
||||
}
|
||||
case "RESET":
|
||||
return {};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
switch (action.type) {
|
||||
case "LAST_OPENED_SET": {
|
||||
return {
|
||||
...state,
|
||||
[action.parent]: action.child,
|
||||
};
|
||||
}
|
||||
case "RESET":
|
||||
return {};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user