mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-31 19:42:15 +00:00
feat: Use V2 API's in Console (#9312)
# Which Problems Are Solved Solves #8976 # Additional Changes I have done some intensive refactorings and we are using the new @zitadel/client package for GRPC access. # Additional Context - Closes #8976 --------- Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CountryCode, parsePhoneNumber } from 'libphonenumber-js';
|
||||
|
||||
export function formatPhone(phone: string): { phone: string; country: CountryCode } | null {
|
||||
export function formatPhone(phone?: string): { phone: string; country: CountryCode } | null {
|
||||
const defaultCountry = 'US';
|
||||
|
||||
if (phone) {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, pairwise, startWith } from 'rxjs/operators';
|
||||
|
||||
export function pairwiseStartWith<T, R>(start: T) {
|
||||
return (source: Observable<R>) =>
|
||||
source.pipe(
|
||||
startWith(start),
|
||||
pairwise(),
|
||||
map(([prev, curr]) => [prev, curr] as [T | R, R]),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user