Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	ch4/src/app/(afterLogin)/home/home.module.css
#	lecture/src/app/(afterLogin)/home/home.module.css
  • Loading branch information
ZeroCho committed Dec 11, 2024
2 parents 51b0821 + 59c1272 commit 8783cc4
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ch3-1/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const handlers = [
// })
return HttpResponse.text(JSON.stringify('ok'), {
headers: {
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/;Max-Age=0'
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/'
}
})
}),
Expand Down
14 changes: 14 additions & 0 deletions ch3-2/src/app/(afterLogin)/home/home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@
border-color: rgb(47, 51, 54);
}
}
@keyframes rotate {
0% {
rotate: 0;
}
50% {
rotate: 180deg;
}
100% {
rotate: 0;
}
}
.loader {
animation: rotate 5s infinite;
}
4 changes: 3 additions & 1 deletion ch3-2/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ export const handlers = [
// })
return HttpResponse.text(JSON.stringify('ok'), {
headers: {
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/;Max-Age=0'
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/'
}
})
}),
http.get('/api/postRecommends', async ({ request }) => {
console.log('추천게시글');
await delay(3000);
console.log('딜레이 종료');
const url = new URL(request.url)
const cursor = parseInt(url.searchParams.get('cursor') as string) || 0
return HttpResponse.json(
Expand Down
21 changes: 11 additions & 10 deletions ch4/src/app/(afterLogin)/home/home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
border-color: rgb(47, 51, 54);
}
}

.loader {
animation: rotating 2s linear infinite;
}

@keyframes rotating {
from {
rotate: 0deg;
@keyframes rotate {
0% {
rotate: 0;
}
50% {
rotate: 180deg;
}
100% {
rotate: 360deg;
rotate: 0;
}
}
}
.loader {
animation: rotate 5s infinite;
}
6 changes: 5 additions & 1 deletion ch4/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const {
events: {
signOut(data) {
console.log('auth.ts events signout', 'session' in data && data.session, 'token' in data && data.token);
fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/logout`, {
method: "POST",
credentials: 'include'
})
// if ('session' in data) {
// data.session = null;
// }
Expand Down Expand Up @@ -70,4 +74,4 @@ export const {
},
}),
]
});
});
2 changes: 1 addition & 1 deletion ch4/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const handlers = [
// })
return HttpResponse.text(JSON.stringify('ok'), {
headers: {
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/;Max-Age=0'
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/'
}
})
}),
Expand Down
21 changes: 11 additions & 10 deletions lecture/src/app/(afterLogin)/home/home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
border-color: rgb(47, 51, 54);
}
}

.loader {
animation: rotating 2s linear infinite;
}

@keyframes rotating {
from {
rotate: 0deg;
@keyframes rotate {
0% {
rotate: 0;
}
50% {
rotate: 180deg;
}
100% {
rotate: 360deg;
rotate: 0;
}
}
}
.loader {
animation: rotate 5s infinite;
}
6 changes: 5 additions & 1 deletion lecture/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const {
events: {
signOut(data) {
console.log('auth.ts events signout', 'session' in data && data.session, 'token' in data && data.token);
fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/logout`, {
method: "POST",
credentials: 'include'
})
// if ('session' in data) {
// data.session = null;
// }
Expand Down Expand Up @@ -70,4 +74,4 @@ export const {
},
}),
]
});
});
2 changes: 1 addition & 1 deletion lecture/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const handlers = [
// })
return HttpResponse.text(JSON.stringify('ok'), {
headers: {
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/;Max-Age=0'
'Set-Cookie': 'connect.sid=msw-cookie;HttpOnly;Path=/'
}
})
}),
Expand Down

0 comments on commit 8783cc4

Please sign in to comment.