Skip to content

Commit

Permalink
[remove] 불필요한 코드 제거 #306
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeyeonKong committed May 23, 2024
1 parent 709818c commit a9e8dcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
3 changes: 1 addition & 2 deletions frontend/lib/widgets/choose_purpose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ class _ChoosePurposeState extends State<ChoosePurpose> {
return;
}

Map<String, dynamic> response =
await matchRequest(senderId, receiverId, _selectedIndex!);
matchRequest(senderId, receiverId, _selectedIndex!);
Navigator.of(context).pop();
Navigator.of(context).pop();
selectedIndexProvider.selectedIndex = 1;
Expand Down
37 changes: 9 additions & 28 deletions frontend/lib/widgets/user_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class UserItem extends StatelessWidget {
borderRadius: const BorderRadius.all(Radius.circular(10))),
child: Row(
children: [
(company == '')
? const ProfileImgMedium(
(company == '무소속')
? const ProfileImgSmall(
isLocal: true,
logoUrl: "assets/coffee_bean.png",
)
: ProfileImgMedium(
: ProfileImgSmall(
isLocal: true,
logoUrl: "assets/$company-logo.png",
),
Expand All @@ -104,10 +104,12 @@ class UserItem extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
nickname,
overflow: TextOverflow.ellipsis,
),
Text(nickname,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
)),
Text(
"$company / $position",
overflow: TextOverflow.ellipsis,
Expand Down Expand Up @@ -252,36 +254,15 @@ class ReceivedReqDialog extends StatelessWidget {
context,
MaterialPageRoute(
builder: (context) => ChatScreen(
// chatroomId: response["data"]["chatroomId"],
matchId: matchId,
nickname: nickname,
logoUrl: logoUrl,
chatroomId: null,
),
),
);

// 오프라인으로 전환
autoOfflineService.autoOffline();

// 커피챗 진행중 여부 true로, 매칭정보 가져오기
Map<String, dynamic> userDetail = await getUserDetail();
getMatchingInfo(userDetail["data"]["userId"]).then((value) {
matchingInfo.setIsMatching(value["isMatching"]);

// 커피챗 진행중이면 상대방 정보도 가져오기
if (value["isMatching"]) {
matchingInfo.setMatching(
matchId: value["matchId"],
myId: value["myId"],
myNickname: value["myNickname"],
myCompany: value["myCompany"],
partnerId: value["partnerId"],
partnerCompany: value["partnerCompany"],
partnerNickname: value["partnerNickname"],
);
}
});
},
handleSecondClick: () async {
onReject?.call(); // onReject 함수 호출
Expand Down

0 comments on commit a9e8dcf

Please sign in to comment.