diff --git a/src/components/common/TitleEditorPopover.tsx b/src/components/common/TitleEditorPopover.tsx
index 3e8e11c5..745eca41 100644
--- a/src/components/common/TitleEditorPopover.tsx
+++ b/src/components/common/TitleEditorPopover.tsx
@@ -23,6 +23,7 @@ interface TitleEditorPopoverProps {
ariaLabel: string;
isPending?: boolean;
titleClassName?: string;
+ showOnMobile?: boolean;
}
export function TitleEditorPopover({
@@ -33,6 +34,7 @@ export function TitleEditorPopover({
ariaLabel,
isPending = false,
titleClassName = 'max-w-60 truncate',
+ showOnMobile = false,
}: TitleEditorPopoverProps) {
const [editTitle, setEditTitle] = useState(title);
@@ -47,7 +49,10 @@ export function TitleEditorPopover({
}
- >
- {({ close }) => (
-
-
-
내 계정
-
-
-
-
{displayName}
-
{user.email}
-
-
-
-
-
-
setTheme(isDark ? 'light' : 'dark')}
- >
-
-
테마
-
- {isDark ? '다크 모드 사용 중' : '라이트 모드 사용 중'}
-
-
-
-
-
-
-
-
-
-
{
- close();
- handleLogout();
- }}
- >
-
-
로그아웃
-
현재 계정에서 로그아웃합니다.
-
-
-
-
-
-
-
{
- close();
- setIsWithdrawModalOpen(true);
- }}
- >
- 회원 탈퇴
-
- 계정과 데이터가 삭제되며 되돌릴 수 없습니다.
-
-
-
-
- )}
-
+ items={[
+ {
+ id: 'logout',
+ label: (
+
+ 로그아웃
+
+
+ ),
+ onClick: handleLogout,
+ variant: 'danger',
+ },
+ {
+ id: 'withdraw',
+ label: '회원 탈퇴',
+ onClick: () => setIsWithdrawModalOpen(true),
+ variant: 'danger',
+ },
+ ]}
+ />
s.openShareModal);
- const { pathname } = useLocation();
- const isSlideRoute = /\/slide\/?$/.test(pathname);
return (
- }
- onClick={openShareModal}
- iconOnlyOnMobile={isSlideRoute}
- />
+ } onClick={openShareModal} iconOnlyOnMobile />
);
}
diff --git a/src/components/slide/script/SlideTitle.tsx b/src/components/slide/script/SlideTitle.tsx
index 831ff506..6bd69405 100644
--- a/src/components/slide/script/SlideTitle.tsx
+++ b/src/components/slide/script/SlideTitle.tsx
@@ -76,6 +76,7 @@ function SlideTitleEditable({
isCollapsed={isCollapsed}
ariaLabel="슬라이드 이름 변경"
titleClassName="max-w-40 truncate"
+ showOnMobile
/>
);
}
diff --git a/src/pages/SlidePage.tsx b/src/pages/SlidePage.tsx
index 1d4bac58..79cd810d 100644
--- a/src/pages/SlidePage.tsx
+++ b/src/pages/SlidePage.tsx
@@ -14,6 +14,11 @@ export default function SlidePage() {
const slideIdParam = searchParams.get('slideId');
const currentSlide = slides?.find((s) => s.slideId === slideIdParam) ?? slides?.[0];
+ const currentIndex = currentSlide
+ ? (slides?.findIndex((s) => s.slideId === currentSlide.slideId) ?? -1)
+ : -1;
+ const hasPrev = currentIndex > 0;
+ const hasNext = !!slides && currentIndex >= 0 && currentIndex < slides.length - 1;
/**
* 슬라이드 로드 에러 처리
@@ -49,15 +54,71 @@ export default function SlidePage() {
}
}, [projectId, currentSlide?.slideId]);
+ const goPrev = () => {
+ if (!slides || !hasPrev) return;
+ setSearchParams({ slideId: slides[currentIndex - 1].slideId }, { replace: true });
+ };
+
+ const goNext = () => {
+ if (!slides || !hasNext) return;
+ setSearchParams({ slideId: slides[currentIndex + 1].slideId }, { replace: true });
+ };
+
return (
-
+
+
+
+
+
+
+
+
+ {slides && currentIndex >= 0 ? `${currentIndex + 1} / ${slides.length}` : '- / -'}
+
+
+
+
+
+
+
+
+
+
);
}