Modern profile sharing in 1:1 and GroupV1 groups

This commit is contained in:
Scott Nonnenberg 2020-10-16 11:31:57 -07:00
parent 60f2422e2a
commit 04b7a29229
22 changed files with 371 additions and 115 deletions

View file

@ -1,7 +1,5 @@
import { ColorType } from '../types/Colors';
// import { missingCaseError } from './missingCaseError';
type OldColorType =
| 'amber'
| 'blue'
@ -22,9 +20,11 @@ type OldColorType =
| 'red'
| 'teal'
| 'yellow'
| 'ultramarine';
| 'ultramarine'
| string
| undefined;
export function migrateColor(color: OldColorType): ColorType {
export function migrateColor(color?: OldColorType): ColorType {
switch (color) {
// These colors no longer exist
case 'orange':
@ -62,10 +62,6 @@ export function migrateColor(color: OldColorType): ColorType {
case 'ultramarine':
return color;
// Can uncomment this to ensure that we've covered all potential cases
// default:
// throw missingCaseError(color);
default:
return 'grey';
}