types.ts 773 B

123456789101112131415161718192021222324252627282930313233
  1. import type {RouteComponentProps} from 'react-router';
  2. export type RelocationState = {
  3. orgSlugs: string;
  4. promoCode: string;
  5. regionUrl: string;
  6. };
  7. export type MaybeUpdateRelocationState = {
  8. orgSlugs?: string;
  9. promoCode?: string;
  10. regionUrl?: string;
  11. };
  12. export type StepProps = Pick<
  13. RouteComponentProps<{}, {}>,
  14. 'router' | 'route' | 'location'
  15. > & {
  16. active: boolean;
  17. existingRelocationUUID: string;
  18. onComplete: (uuid?: string) => void;
  19. onUpdateRelocationState: (MaybeUpdateRelocationState) => void;
  20. publicKeys: Map<string, string>;
  21. relocationState: RelocationState;
  22. stepIndex: number;
  23. };
  24. export type StepDescriptor = {
  25. Component: React.ComponentType<StepProps>;
  26. cornerVariant: 'top-right' | 'top-left';
  27. id: string;
  28. title: string;
  29. };