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

5차 배포 - QA 이슈 대응 - #65 #68

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/app/(afterlogin)/(common_navbar)/_components/CardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const CardItem = ({ listInfo }: Props) => {
if (PresentationListTypeGuard(listInfo)) {
return listInfo.thumbnailPath ? (
<Image
src={`${CDN_BASE_URL}/${listInfo.thumbnailPath}`}
src={`${CDN_BASE_URL}${listInfo.thumbnailPath}`}
alt={`${listInfo.id} 썸네일`}
width={440}
height={250}
Expand All @@ -67,7 +67,7 @@ const CardItem = ({ listInfo }: Props) => {
) {
return (
<Image
src={`${CDN_BASE_URL}/${listInfo.thumbnailPath}`}
src={`${CDN_BASE_URL}${listInfo.thumbnailPath}`}
alt={`${listInfo.id} 썸네일`}
width={440}
height={250}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const HistoryBanner = ({ presentation }: Props) => {
<div className={styles.history__contents}>
<div className={styles.presentation__thumbnail}>
<Image
src={`${CDN_BASE_URL}/${presentation.thumbnailPath}`}
src={`${CDN_BASE_URL}${presentation.thumbnailPath}`}
width={165}
height={90}
alt="최근 발표 이미지"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const ControlButtons = ({
})}
>
<Image
src={`${CDN_BASE_URL}/${item.imageFilePath}`}
src={`${CDN_BASE_URL}${item.imageFilePath}`}
fill
alt="ppt이미지"
style={{ borderRadius: '8px' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const UploadPpt = ({
<div className={styles.pptImageSection}>
<div className={styles.hoverSection}>
<Image
src={`${CDN_BASE_URL}/${pptInfo.imageFilePath}`}
src={`${CDN_BASE_URL}${pptInfo.imageFilePath}`}
alt={`${currentPageIndex + 1}페이지 ppt 이미지`}
fill
style={{ borderRadius: '16px' }}
Expand Down
48 changes: 48 additions & 0 deletions src/app/(afterlogin)/_components/LogoutIcon.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@import '@/styles/globals';
@import '@/styles/mixins';

.container {
display: flex;
align-items: center;
position: relative;

// TODO: 일반 HTML요소는 100%로 사용이 가능하지만
// FlyoutMenu를 사용하면 불가능해짐
height: 68px;
}

.menu {
@include pure-button;

display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;

span {
color: $red-7;
font-size: $font-2;
font-weight: bolder;
letter-spacing: 2px;
}
}

.logoutList {
position: absolute;
top: 30px;
right: 0;
left: auto;
z-index: 2;
width: 120px;
padding: 0;
background: $white;
border: 1px solid $gray-1;
border-radius: 8px;
box-shadow: 2px 2px 3px $gray-2;
}

// .logoutList {
// right: 0 !important;
// left: auto !important;
// }
51 changes: 51 additions & 0 deletions src/app/(afterlogin)/_components/LogoutIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'use client';

import FlyoutMenu from '@/app/_components/_modules/FlyoutMenu';
import useToggle from '@/app/_hooks/useToggle';
import styles from './LogoutIcon.module.scss';
import { useRouter } from 'next/navigation';

const LogoutIcon = () => {
const flyout = useToggle();
const router = useRouter();

const logout = async () => {
// await fetch(`${ROUTE_HANDLER_BASE_URL}/api/get/logout`, {
// method: 'GET',
// });
router.push(`/logout`);
router.refresh();
};

return (
<div className={styles.container}>
<FlyoutMenu context={flyout}>
<FlyoutMenu.ToggleButton>
<i>
<svg
xmlns="http://www.w3.org/2000/svg"
width="30"
height="30"
viewBox="0 0 30 30"
fill="none"
>
<path
d="M15 15C19.1438 15 22.5 11.6438 22.5 7.5C22.5 3.35625 19.1438 0 15 0C10.8562 0 7.5 3.35625 7.5 7.5C7.5 11.6438 10.8562 15 15 15ZM15 18.75C9.99375 18.75 0 21.2625 0 26.25V30H30V26.25C30 21.2625 20.0063 18.75 15 18.75Z"
fill="#BFBFBF"
/>
</svg>
</i>
</FlyoutMenu.ToggleButton>
<FlyoutMenu.MenuList className={styles.logoutList}>
<FlyoutMenu.MenuItem>
<button className={styles.menu} onClick={logout}>
<span>로그아웃</span>
</button>
</FlyoutMenu.MenuItem>
</FlyoutMenu.MenuList>
</FlyoutMenu>
</div>
);
};

export default LogoutIcon;
6 changes: 4 additions & 2 deletions src/app/(afterlogin)/_components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import NavMenu from './NavMenu';
import styles from './Navbar.module.scss';
import LogoIcon from '@/app/_svgs/LogoIcon';
import UserIcon from '../_svgs/UserIcon';

import { serverUserApi } from '@/services/server/user';
import { fetch_ServerAuth } from '@/services/server/fetchServer';
import LogoutIcon from './LogoutIcon';
import UserIcon from '../_svgs/UserIcon';

const Navbar = async () => {
// const res = await fetch_ServerAuth(`${process.env.NEXT_PUBLIC_BASE_URL_DEV}/api/accounts/me`, {
Expand All @@ -25,7 +26,8 @@ const Navbar = async () => {
</div>

<div className={styles.right}>
<UserIcon />
<LogoutIcon />
{/* <UserIcon /> */}
</div>
</div>
</nav>
Expand Down
1 change: 1 addition & 0 deletions src/app/(afterlogin)/practice/[id]/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
padding: 20px;
border: 1px solid $gray-1;
border-radius: 15px;
background-color: white;
}
}

Expand Down
Loading
Loading