Redesign device link screens
This commit is contained in:
parent
a023fc1bb0
commit
364f00f37a
36 changed files with 1358 additions and 803 deletions
15
ts/util/loadable.ts
Normal file
15
ts/util/loadable.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export enum LoadingState {
|
||||
Loading,
|
||||
Loaded,
|
||||
LoadFailed,
|
||||
}
|
||||
|
||||
export type Loadable<ValueT, ErrorT = unknown> =
|
||||
| {
|
||||
loadingState: LoadingState.Loading;
|
||||
}
|
||||
| { loadingState: LoadingState.Loaded; value: ValueT }
|
||||
| { loadingState: LoadingState.LoadFailed; error: ErrorT };
|
Loading…
Add table
Add a link
Reference in a new issue