Skip to content
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
2 changes: 1 addition & 1 deletion apps/app/app/+native-intent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function redirectSystemPath({ path }: { path: string; initial: boolean })
if (webFromUrl) return `/?web=${encodeURIComponent(webFromUrl)}`;

try {
/** share extension → openHostApp(`/?web=${encodeURIComponent('/archive/wish')}`) */
/** share extension → openHostApp(`/?web=${encodeURIComponent('/wish')}`) */
const url = new URL(path, 'piki://app');
const web = url.searchParams.get('web');

Expand Down
162 changes: 0 additions & 162 deletions apps/app/app/dev/share-sheet-preview.tsx

This file was deleted.

9 changes: 4 additions & 5 deletions apps/app/components/ShareBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const LOGIN_REQUIRED_REASONS: ShareFailureReasonT[] = ['unauthenticated', 'sessi
/** 재시도는 1회까지. 또 실패하면 확인 버튼만 남긴다. */
const MAX_RETRY_COUNT = 1;

export type SheetStateT =
type SheetStateT =
/** POST 진행 중 + 파싱 대기(SSE) — 화면은 동일한 로딩 */
| { status: 'loading' }
/** 파싱 결과를 못 받은 폴백 — 저장 성공은 POST 응답으로 이미 확정 */
Expand Down Expand Up @@ -59,9 +59,9 @@ function ShareBottomSheetContent({ url, text }: ShareExtensionProps) {
openHostApp(`/?web=${encodeURIComponent(webPath)}`);
};

const handleOpenWishlist = () => openHostAppAt('/archive/wish');
const handleOpenWishlist = () => openHostAppAt('/wish');
const handleOpenLogin = () => openHostAppAt('/login');
const handleOpenWishEdit = (wishId: number) => openHostAppAt(`/archive/wish/${wishId}`);
const handleOpenWishEdit = (wishId: number) => openHostAppAt(`/wish/${wishId}`);

const handleClose = () => {
abortRef.current?.abort();
Expand Down Expand Up @@ -199,8 +199,7 @@ type ShareBottomSheetViewProps = {
onOpenWishEdit: (wishId: number) => void;
};

/** 상태별 렌더만 담당 — dev 프리뷰(dev/share-sheet-preview)에서 mock 상태로 재사용한다 */
export function ShareBottomSheetView({
function ShareBottomSheetView({
state: sheetState,
canRetry,
onClose,
Expand Down
6 changes: 3 additions & 3 deletions apps/app/hooks/useShareIntent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useCallback, useEffect, useRef } from 'react';
import { toShareIntentPayload } from '@/utils/serializeShareIntent';
import { WebBridge } from '@/utils/webBridge';

const WISHLIST_PATH = '/archive/wish';
const WISHLIST_PATH = '/wish';

const isWishlistPath = (uri: URL) => uri.pathname === WISHLIST_PATH;

Expand Down Expand Up @@ -40,13 +40,13 @@ export const useShareIntent = ({ onChangeWebviewUri, webviewUri }: Props) => {
try {
const nextUri = new URL(webviewUri);

/** 이미 아카이브 위시 탭: 즉시 전송 */
/** 이미 위시 목록: 즉시 전송 */
if (isWishlistPath(nextUri)) {
sendShareIntent();
return;
}

/** 다른 페이지: payload 보관 후 아카이브 위시로 이동 → WEB_REQ_READY 수신 시 전송 */
/** 다른 페이지: payload 보관 후 위시 목록으로 이동 → WEB_REQ_READY 수신 시 전송 */
nextUri.pathname = WISHLIST_PATH;
nextUri.search = '';
nextUri.hash = '';
Expand Down
Loading