Skip to content

Commit

Permalink
feat: group detail info fix done
Browse files Browse the repository at this point in the history
  • Loading branch information
MdTeach committed Oct 10, 2023
1 parent 4fc9940 commit a264cbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { ThemeContext } from '../theme/ThemeProvider';
import { CriteriaStateManagerType, useCriteriaStateManager } from '../../../hooks/chat/useCriteriaState';

import {Image} from "../../../config/styles"
import { device } from '../../../config';
import { ProfilePicture, device } from '../../../config';


export const CREATE_GROUP_STEP_KEYS = {
INPUT_DETAILS: 1,
Expand All @@ -38,7 +39,7 @@ export type CreateGroupStepKeys =
interface GroupInputDetailsType{
groupName:string;
groupDescription:string;
groupImage:string|null;
groupImage:string;
}


Expand Down Expand Up @@ -69,9 +70,9 @@ export const CreateGroupModal: React.FC<CreateGroupModalProps> = ({
},[activeComponent])

const [groupInputDetails, setGroupInputDetails] = useState<GroupInputDetailsType>({
groupName:'',
groupDescription:'',
groupImage:null
groupName:'Push Group Chat',
groupDescription:'This is the oficial group for Push Protocol',
groupImage:ProfilePicture
})


Expand Down Expand Up @@ -155,7 +156,7 @@ const CreateGroupDetail = ({handleNext, onClose, groupInputDetails, setGroupInpu
}

const verifyAndHandelNext = ()=>{
const skipVerify = true;
const skipVerify = false;

if(!skipVerify){
// verify name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,14 @@ export const CreateGroupType = ({

const createGroupService = async () => {
// TODO:use actual data instead of dummy data
// const groupInfo = {
// groupInfo: { ...groupInputDetails },
// groupType: groupEncryptionType,
// };
const dummyGrouInfo: GroupInfoType = {
groupName: 'Push Group Chat 3',
groupDescription: 'This is the oficial group for Push Protocol',
groupImage:
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lml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4HUtlOcQjLYCu+fzGJH2QRKvP3UNz8bWk1qMxjGTOMThZ3kvgLI5AzFfo379UAAAAASUVORK5CYII=',
isPublic: true,
const groupInfo:GroupInfoType = {
groupName:groupInputDetails.groupName,
groupDescription:groupInputDetails.groupDescription,
groupImage:groupInputDetails.groupImage,
isPublic: true //groupEncryptionType,
};

const rules: any = criteriaStateManager.generateRule();
await createGatedGroup(dummyGrouInfo, rules);
await createGatedGroup(groupInfo, rules);
groupInfoToast.showMessageToast({
toastTitle: 'Success',
toastMessage: 'Group created successfully',
Expand Down

0 comments on commit a264cbf

Please sign in to comment.