Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

プロフィールに試合の勝敗結果を表示。 #215

Merged
merged 26 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b79f1ad
feat: そのユーザーの試合の勝敗を表示
subarunrun0812 Oct 19, 2024
e3dbc3a
init
libknt Oct 19, 2024
d9a3232
feat: 4人対戦のURLを生成可能に
libknt Oct 19, 2024
247c037
feat: chatからのponggame招待を2~4人で設定可能に
libknt Oct 19, 2024
f27cdda
add: 2人 or 4人でmessageの変更
libknt Oct 19, 2024
189becd
Merge remote-tracking branch 'origin/develop' into 202-game-stats-in-…
subarunrun0812 Oct 19, 2024
220165f
fix: refs #212 return when websocket is undefined.
massahito Oct 19, 2024
d1fdbe0
fix: refs #212 remove friend page console error.
massahito Oct 19, 2024
f7a1d6c
init
libknt Oct 19, 2024
3c0f27d
fix: sidebarのsttingの削除
libknt Oct 19, 2024
cbf0411
init
libknt Oct 19, 2024
b79e62a
fix: changePage
libknt Oct 19, 2024
5b1cae5
fix: changePageでpathが"/"の際に無視するように設定
libknt Oct 19, 2024
006329e
feat: 他のuserのprofileにGameStatsを表示
subarunrun0812 Oct 20, 2024
dbcd697
format
subarunrun0812 Oct 20, 2024
66a8300
Merge remote-tracking branch 'origin/develop' into 202-game-stats-in-…
subarunrun0812 Oct 20, 2024
da856fd
refactor 不要なコメントを削除
subarunrun0812 Oct 20, 2024
fd9bab8
Merge branch 'develop' into 202-game-stats-in-profile
subarunrun0812 Oct 20, 2024
b76d759
ADD: ProfileにReactionGame
subarunrun0812 Oct 20, 2024
af24ad6
format
subarunrun0812 Oct 20, 2024
19eb555
Merge branch 'develop' into 202-game-stats-in-profile
subarunrun0812 Oct 20, 2024
822c768
fix; loss->lose
subarunrun0812 Oct 20, 2024
ebb7860
fix; scrollできない
subarunrun0812 Oct 20, 2024
e3f9229
init
libknt Oct 20, 2024
d545805
fix
libknt Oct 20, 2024
8ecd7f8
Merge pull request #227 from ShotaTanemura/fix/reaction-game
libknt Oct 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: refs #212 remove friend page console error.
フレンドが1人もいない場合に404が帰ってきていたのですが、
空のリストを返すことで対処しました。
  • Loading branch information
massahito authored and subarunrun0812 committed Oct 20, 2024
commit d1fdbe0e1dc96922b6b6b2cdfe32e50323c018b1
6 changes: 3 additions & 3 deletions pong/pong/static/pong/components/Friend.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Friend extends Component {

createFriendList = async () => {
const friendsData = await getFriendsData();
if (!friendsData) {
if (!friendsData.length) {
const friendNotFoundElement = Object.assign(document.createElement("p"), {
className: "p-3 text-secondary",
});
Expand Down Expand Up @@ -78,7 +78,7 @@ export class Friend extends Component {

createRequestedFriendList = async () => {
const friendsData = await getRequestedFriendsData();
if (!friendsData) {
if (!friendsData.length) {
const friendNotFoundElement = Object.assign(document.createElement("p"), {
className: "p-3 text-secondary",
});
Expand Down Expand Up @@ -131,7 +131,7 @@ export class Friend extends Component {

createPendingFriendList = async () => {
const friendsData = await getPendingFriendsData();
if (!friendsData) {
if (!friendsData.length) {
const friendNotFoundElement = Object.assign(document.createElement("p"), {
className: "p-3 text-secondary",
});
Expand Down
12 changes: 3 additions & 9 deletions pong/pong/views/friends.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ def get_friends(request):
)
friends = Friend.objects.filter(user=user)
if not friends:
return JsonResponse(
{"message": "RequestNotFound", "status": "NotFound"}, status=404
)
friends = []
hitted_friend_list = []
for friend in friends:
hitted_friend_list.append(
Expand Down Expand Up @@ -182,9 +180,7 @@ def get_requested_friends(request):
)
friends = FriendRequest.objects.filter(reciever=user)
if not friends:
return JsonResponse(
{"message": "RequestNotFound", "status": "NotFound"}, status=404
)
friends = []
hitted_friend_list = []
for friend in friends:
hitted_friend_list.append(
Expand Down Expand Up @@ -221,9 +217,7 @@ def get_pending_friends(request):
)
friends = FriendRequest.objects.filter(sender=user)
if not friends:
return JsonResponse(
{"message": "RequestNotFound", "status": "NotFound"}, status=404
)
friends = []
hitted_friend_list = []
for friend in friends:
hitted_friend_list.append(
Expand Down