Skip to content

Commit

Permalink
fix: modal
Browse files Browse the repository at this point in the history
  • Loading branch information
sshanzel committed Feb 3, 2025
1 parent 9d299e8 commit 32a3af5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 2 additions & 6 deletions packages/shared/src/hooks/useProfileForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
socialHandleRegex,
UPDATE_USER_PROFILE_MUTATION,
} from '../graphql/users';
import type { LoggedUser, UserProfile } from '../lib/user';
import type { LoggedUser, UserFlagsPublic, UserProfile } from '../lib/user';
import { useToastNotification } from './useToastNotification';
import type { ResponseError } from '../graphql/common';
import { errorMessage, gqlClient } from '../graphql/common';
Expand All @@ -30,14 +30,10 @@ export interface ProfileFormHint {
bluesky?: string;
}

export type UserFlagsPublic = {
showPlusGift: boolean;
};

export interface UpdateProfileParameters extends Partial<UserProfile> {
image?: File;
onUpdateSuccess?: () => void;
flags?: Partial<UserFlagsPublic>;
flags?: UserFlagsPublic;
}

interface UseProfileForm {
Expand Down
8 changes: 5 additions & 3 deletions packages/shared/src/lib/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ export interface UserShortProfile
topReader?: Partial<TopReader>;
}

export type UserFlagsPublic = Partial<{
showPlusGift: boolean;
}>;

export interface LoggedUser extends UserProfile, AnonymousUser {
image: string;
infoConfirmed?: boolean;
Expand All @@ -136,9 +140,7 @@ export interface LoggedUser extends UserProfile, AnonymousUser {
companies?: Company[];
contentPreference?: ContentPreference;
defaultFeedId?: string;
flags?: {
showPlusGift?: boolean;
};
flags?: UserFlagsPublic;
}

interface BaseError {
Expand Down

0 comments on commit 32a3af5

Please sign in to comment.