From dbf8d148104b5231740ef44e0c6f4a6f9f0560c1 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Wed, 31 May 2023 15:42:14 -0700 Subject: [PATCH] refactor(types): UserProfileLink --- types/server.ts | 6 ++---- types/userProfile.ts | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/server.ts b/types/server.ts index e7a7f39d0..867e1b2cd 100644 --- a/types/server.ts +++ b/types/server.ts @@ -1,4 +1,5 @@ import { KeyIcon } from '@heroicons/vue/24/solid'; +import { UserProfileLink } from '~/types/userProfile'; export enum ServerState { BASIC = 'BASIC', @@ -42,11 +43,8 @@ export interface Server { // @todo convert to object with text and click payload export type ServerStateDataActionType = 'signIn'|'signOut'|'purchase'|'redeem'|'upgrade'|'recover'|'replace'|'trialExtend'|'trialStart'; -export interface ServerStateDataAction { - click: any; // @todo be more specific - icon?: typeof KeyIcon +export interface ServerStateDataAction extends UserProfileLink { name: ServerStateDataActionType; - text: string; } export interface ServerStateDataError { diff --git a/types/userProfile.ts b/types/userProfile.ts index 9669de7b4..0a1797d23 100644 --- a/types/userProfile.ts +++ b/types/userProfile.ts @@ -1,10 +1,12 @@ import { ArrowTopRightOnSquareIcon } from '@heroicons/vue/24/solid'; export interface UserProfileLink { + click?: any; // @todo be more specific emphasize?: boolean; external?: boolean; - href: string; + href?: string; icon?: typeof ArrowTopRightOnSquareIcon; + name?: string; text: string; title?: string; }