Skip to content

Commit

Permalink
fix: changed the name of modal clickaway prop for user profile and ch…
Browse files Browse the repository at this point in the history
…at profile
  • Loading branch information
abhishek-01k committed Jul 1, 2024
1 parent 9a48606 commit 490eddf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface IChatProfileUserInfo {
// Exported Functions
export const ChatProfile: React.FC<IChatProfile> = ({
chatId,
closeGroupInfoModalOnClickAway,
closeChatProfileInfoModalOnClickAway,
groupInfoModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
groupInfoModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
chatProfileRightHelperComponent = null,
Expand Down Expand Up @@ -336,7 +336,7 @@ export const ChatProfile: React.FC<IChatProfile> = ({
<GroupInfoModal
theme={theme}
setModal={setModal}
closeModalOnClickAway={closeGroupInfoModalOnClickAway}
closeModalOnClickAway={closeChatProfileInfoModalOnClickAway}
groupInfo={initialized.groupInfo!}
chatProfileInfo={initialized.profile}
setGroupInfo={(mutatedGroupInfo) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
chatProfileRightHelperComponent = null,
chatProfileLeftHelperComponent = null,
welcomeComponent = null,
closeGroupInfoModalOnClickAway = false
closeChatProfileInfoModalOnClickAway = false
} = options || {};

const { user } = useChatData();
Expand Down Expand Up @@ -110,7 +110,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
>
<ChatProfile
key={chatId}
closeGroupInfoModalOnClickAway={closeGroupInfoModalOnClickAway}
closeChatProfileInfoModalOnClickAway={closeChatProfileInfoModalOnClickAway}
chatProfileRightHelperComponent={chatProfileRightHelperComponent}
chatProfileLeftHelperComponent={chatProfileLeftHelperComponent}
chatId={initialized.derivedChatId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type UpdateUserProfileModalProps = {
userProfile: IUser;
setUserProfile: React.Dispatch<React.SetStateAction<IUser | undefined>>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
closeProfileModalOnClickAway?: boolean;
closeUserProfileModalOnClickAway?: boolean;
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
};
Expand All @@ -34,7 +34,7 @@ export interface UserProfileType {
export const UpdateUserProfileModal = ({
theme,
setModal,
closeProfileModalOnClickAway,
closeUserProfileModalOnClickAway,
userProfile,
setUserProfile,
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
Expand Down Expand Up @@ -164,7 +164,7 @@ export const UpdateUserProfileModal = ({
return (
<Modal
onClose={onClose}
closeonClickAway={closeProfileModalOnClickAway}
closeonClickAway={closeUserProfileModalOnClickAway}
modalBackground={updateUserProfileModalBackground}
modalPositionType={updateUserProfileModalPositionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
updateUserProfileModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
onUserProfileUpdateModalOpen,
closeProfileModalOnClickAway = false
closeUserProfileModalOnClickAway = false
}) => {
const { user } = useChatData();
const [userProfile, setUserProfile] = useState<IUser>();
Expand Down Expand Up @@ -144,7 +144,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
<UpdateUserProfileModal
theme={theme}
setModal={setShowUpdateUserProfileModal}
closeProfileModalOnClickAway={closeProfileModalOnClickAway}
closeUserProfileModalOnClickAway={closeUserProfileModalOnClickAway}
userProfile={userProfile!}
setUserProfile={setUserProfile}
updateUserProfileModalBackground={updateUserProfileModalBackground}
Expand Down
6 changes: 3 additions & 3 deletions packages/uiweb/src/lib/components/chat/exportedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export interface IChatViewComponentProps {
chatProfileRightHelperComponent?: React.ReactNode;
chatProfileLeftHelperComponent?: React.ReactNode;
welcomeComponent?: React.ReactNode;
closeGroupInfoModalOnClickAway?: boolean;
closeChatProfileInfoModalOnClickAway?: boolean;
}

export interface IChatProfile {
chatId: string;
closeGroupInfoModalOnClickAway?: boolean;
closeChatProfileInfoModalOnClickAway?: boolean;
groupInfoModalBackground?: ModalBackgroundType;
groupInfoModalPositionType?: ModalPositionType;
chatProfileRightHelperComponent?: React.ReactNode;
Expand Down Expand Up @@ -184,7 +184,7 @@ export interface UserProfileProps {
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
onUserProfileUpdateModalOpen?: (open: boolean) => void;
closeProfileModalOnClickAway?: boolean;
closeUserProfileModalOnClickAway?: boolean;
}

export interface ModalButtonProps {
Expand Down

0 comments on commit 490eddf

Please sign in to comment.