Skip to content

Commit

Permalink
feat(FE) : 로그아웃오류 수정(#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
SUMMERLOVE7 committed Feb 21, 2023
1 parent ba10ef2 commit f8669b4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/src/components/auth/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const login = () => {

await loginU(userData);
navigate('/card');
await notification('로그인', 'login')();
await notification('로그인 성공', 'login');

const firebaseConfig = {
apiKey: 'AIzaSyCsLBsvozvTnYlDH-5cS0A8X_AjV5o4jjM',
Expand Down
16 changes: 8 additions & 8 deletions client/src/components/common/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ const header = (props) => {
logoutModal();
};

const openMenuEvent = async () => {
const openMenuEvent = () => {
const trigger = $.qs('.trigger');
const menuTarget = $.qs('.menu-section');
await toggleActive(trigger);
toggleActive(trigger);
toggleActive(menuTarget);

$.on('click', logoutEvent)($.qs('.modal-button'));
//$.on('click', logoutEvent)($.qs('.modal-button'));
};

const toggleActive = async (target) => target.classList.toggle('active');
const toggleActive = (target) => target.classList.toggle('active');

const navigatePath = (fragment, target, path) =>
_.go(
Expand All @@ -99,10 +99,10 @@ const header = (props) => {
(fragment) => $.prepend(fragment, $.qs('#root')),
handleEvent);

// color === 'mint' && _.go(
// sideMenu(),
// () => $.qs('.trigger'),
// $.on('click', openMenuEvent));
color === 'mint' && _.go(
sideMenu(),
() => $.qs('.trigger'),
$.on('click', openMenuEvent));
}
return appendHeader;
};
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/common/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const logout = (label, classname) => {
_.go(
logoutTpl,
$.el,
$.replace($.qs('.main-card-box')));
// $.replace($.qs('.main-card-box'))
$.append($.qs('.menu-section')));

return renderLogoutModal;
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/common/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { _ } from '@/utils/customFx';
const notification = (label, classname) => {
const notificationTpl = `
<div class='notification-container ${classname}'>
<p>${label} 되었습니다.</p>
<p>${label}</p>
</div>
`;

Expand Down

0 comments on commit f8669b4

Please sign in to comment.