[feat] solution,postgres-init,docs: SNS 게재 — 사장님이 누르면 쓰고, 승인받아, 사장님 계정으로 올린다
발행한 사이트로 사람을 데려올 경로가 제품 안에 없었다. IndexNow 통보와 사이트맵뿐이고 그건
검색엔진이 언제 읽을지 우리가 모른다. 이제 사장님이 [Threads에 알리기] 를 누르면 확인된 fact 로
짧은 글을 쓰고, 승인을 받아 사장님 개인 계정으로 올린다. 올린 글은 발행본 맨 아래에도 실린다.
★ 이 레포가 처음으로 ①외부에 쓰기를 하고 ②남의 계정 자격증명을 보관하고 ③되돌릴 수 없는
행위를 한다. 아래 결정이 전부 여기서 나왔다.
승인을 다시 둔다 — 7절("승인 없이 나간다")의 예외다(DECISIONS 7-1). 기준은 문장의 참/거짓이
아니라 명의(사장님 계정의 발언) · 회수 가능성(없다) · 무엇이 주로 틀리나(문장이 아니라 링크 —
`_publish_target` 이 계산하므로 앞 게이트가 못 본다)다. 7절의 함정은 구조로 막았다:
시작이 사장님 클릭이라 "안 눌러서 영영 안 나감" 이 생기지 않고, 승인 경로가 둘(화면·알림톡)이며,
미승인은 EXPIRED 로 화면에 보이게 남는다.
★ 게시는 `domain` 이 확정된 사이트에만. 비면 슬러그가 상호명에서 파생돼(`_publish_target`)
상호를 고치는 순간 주소가 바뀌고, 이미 올라간 글의 링크는 404 가 된다 — 그 글은 수정할 수 없다.
★ 승인은 GET 이 아니라 POST. 메신저 링크 미리보기·백신·프리페치가 사람이 누르기 전에 URL 을
연다. 일회성은 토큰이 아니라 `status='PENDING_APPROVAL'` 조건이 붙은 단일 UPDATE 가 보장한다.
★ 사진은 올리지 않는다 — 1-2 의 격리("나중에 필터로 뺀다")가 SNS 에서는 구조적으로 불가능하다.
필터가 아니라 첨부 코드를 아예 만들지 않았다.
★ 게시는 기본으로 꺼져 있다(`SOCIAL_POSTING_ENABLED=0`). 플랫폼 계약과 1-4(해지 시 처리)
결론을 확인한 뒤 사람이 연다 — 1-4 가 이 기능의 전제조건이 됐다.
플랫폼은 스레드다. X 는 URL 이 든 글에 요청당 $0.20 이 안내돼 있어 "계정 단위 고정비" 라는
처음 가정이 틀렸다(사이트마다 나가는 변동비다). 어댑터 경계는 두되 X 어댑터는 넣지 않았다.
- place_social_posts · owner_social_accounts 신설(init.sql + 0012·0013). 승인 대기는 잡이 아니라
행의 상태다 — 잡으로 매달면 lease 만료로 DEAD 가 된다
- services/social_service · social_account_service · notify_service · external/{threads,alimtalk,social}
- router/v1/social — GET 은 상태를 바꾸지 않고, POST 가 링크·계정을 재검사한 뒤 CAS 한다
- 빌더 SocialPanel(발행 완료 화면) + 무인증 승인 페이지 `/approve/:postId`
- 발행본 SocialPostsSection — 정적 카드 + 원문 링크. 위젯·임베드 없음. 고유 콘텐츠 계수에서 제외
- nginx: `/approve/` 는 no-referrer · no-store · noindex + 액세스 로그 끔
밟은 함정 둘
- ORM 기본값에 쉼표가 딸려 들어갔다: `text("'[]',")` → `DEFAULT '[]', NOT NULL` 로 나가
CREATE TABLE 이 통째로 실패. 운영 DB 는 init.sql 로 만들어져 안 드러나고 ORM 이 스키마를
만드는 테스트 DB 에서만 터진다 — 09-10 의 `now()` 기본값 사고와 같은 자리다
- 승인 스윕이 1분 주기라 쓰기 커넥션을 계속 집어 들었다 → 5분. 이 스윕은 만료 표시와 중단 정리뿐이라
분 단위 정밀도가 필요 없다
검증: 백엔드 645 passed / 5 failed(전부 환경 — 프론트 소스 부재·레이트리밋).
★ 테스트에 실제 API 키가 새면 BUILD 잡이 Suno·Perplexity 를 진짜로 부른다(실측: 한 파일 12분 →
키를 비우면 10초). 키를 비운 상태가 정상 실행 조건이다.
에디터 목록 대조(test_site_theme) 22건 통과 · tsc·eslint 통과 · vitest 62 passed
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c07e2bddf4
commit
0e0f2cf038
54 files changed
+2555
-13
No files matched your search
@@ -181,6 +181,7 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'story', type: 'story', name: '지역 이야기', isLocked: false, isEnabled: true, description: '가요·인물·연표·엽서·퀴즈를 탭으로' },
|
||||
{ id: 'faq', type: 'faq', name: '자주 묻는 질문', isLocked: false, isEnabled: true, description: '고객들이 자주 묻는 질문과 답변' },
|
||||
{ id: 'weather', type: 'weather', name: '날씨', isLocked: false, isEnabled: true, description: '현재 기온과 사업장 주변 날씨' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('stay', '#2563eb', {
|
||||
name: '옛 항구',
|
||||
@@ -214,6 +215,7 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'weather', type: 'weather', name: '날씨', isLocked: false, isEnabled: true, description: '현재 기온과 매장 주변 날씨' },
|
||||
{ id: 'local', type: 'local', name: '주변 나들이', isLocked: false, isEnabled: true, description: '양평 드라이브 코스 및 명소' },
|
||||
{ id: 'faq', type: 'faq', name: '자주 묻는 질문', isLocked: false, isEnabled: true, description: '반려견 동반, 주차, 케어키즈존 안내' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('cafe', '#b45309', {
|
||||
name: '옛 다방',
|
||||
@@ -243,6 +245,7 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'weather', type: 'weather', name: '날씨', isLocked: false, isEnabled: true, description: '현재 기온과 매장 주변 날씨' },
|
||||
{ id: 'local', type: 'local', name: '주변 안내', isLocked: false, isEnabled: true, description: '청담 명품거리 및 갤러리 안내' },
|
||||
{ id: 'faq', type: 'faq', name: '자주 묻는 질문', isLocked: false, isEnabled: true, description: '콜키지 정책, 알러지 케어, 주차 안내' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('restaurant', '#16a34a', {
|
||||
name: '노포',
|
||||
@@ -272,6 +275,7 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'weather', type: 'weather', name: '날씨', isLocked: false, isEnabled: false, description: '현재 기온과 주변 날씨' },
|
||||
{ id: 'local', type: 'local', name: '주변 정보', isLocked: false, isEnabled: false, description: '주변 편의시설' },
|
||||
{ id: 'faq', type: 'faq', name: '자주 묻는 질문', isLocked: false, isEnabled: true, description: '예약 변경, 회복 기간, 주의사항' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('clinic', '#4A9DC4', {
|
||||
name: '클린',
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* 여기 한 줄을 더한다는 뜻이고, 그 순간 캔버스와 고르는 UI가 동시에 늘어난다.
|
||||
*/
|
||||
import type {IndustryType, SectionItem} from '@o2o/shared';
|
||||
import {SocialCanvasSection} from '@/features/social/SocialCanvasSection';
|
||||
import type {SectionVariant} from './types';
|
||||
|
||||
import {HeroCover} from './variants/hero/HeroCover';
|
||||
@@ -366,6 +367,7 @@ export const SECTION_VARIANTS: Record<string, SectionVariant[]> = {
|
||||
},
|
||||
],
|
||||
|
||||
social: [{id: 'social.cards', name: '함께 발행한 소식', description: '승인해 SNS에 게재한 최신 소식. 홈페이지 맨 아래에 표시합니다.', thumb: 'cards', Component: SocialCanvasSection, isDefault: true}],
|
||||
songs: [
|
||||
{
|
||||
id: 'songs.turntable',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import {SocialPanel} from '@/features/social/SocialPanel';
|
||||
import {useCallback, useEffect, useMemo, useState} from 'react';
|
||||
import {useNavigate} from 'react-router';
|
||||
import {
|
||||
@@ -380,6 +381,7 @@ export function PublishModal() {
|
||||
|
||||
{/* ★ 서버 판정. 화면 점검(gate)이 통과여도 여기서 막힐 수 있다 — 저장된 fact 기준이라 기준값이 다르다. */}
|
||||
<ServerVerdict state={state} />
|
||||
{placeId && (isDone || isRepublish) && <SocialPanel placeId={placeId} />}
|
||||
|
||||
{isDone && (
|
||||
<div className="flex items-center justify-between gap-2 rounded-lg border border-border bg-muted/40 p-3 text-left">
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import {SectionBody, SectionFrame, SectionHeading} from '@/features/builder/canvas/primitives';
|
||||
import type {SectionRenderProps} from '@/features/builder/canvas/types';
|
||||
|
||||
export function SocialCanvasSection({section, isSelected, onSelect, template}: SectionRenderProps) {
|
||||
return <SectionFrame section={section} isSelected={isSelected} onSelect={onSelect} tone="paper">
|
||||
<SectionBody width="narrow">
|
||||
<SectionHeading variant="minimal" title="함께 발행한 소식" subtitle="승인해 Threads에 게재한 최신 소식이 홈페이지 맨 아래에 표시됩니다." colors={template.colors} />
|
||||
</SectionBody>
|
||||
</SectionFrame>;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import {useSearchParams} from 'react-router';
|
||||
|
||||
export function SocialConnectionNotice() {
|
||||
const [query] = useSearchParams();
|
||||
const status = query.get('social');
|
||||
if (!status) return null;
|
||||
return <p role="status" className="mb-4 rounded-lg border p-4 text-sm">{status === 'connected'
|
||||
? 'Threads 계정을 연결했습니다. 홈페이지 발행 화면에서 원고를 확인하고 게재를 승인해 주세요.'
|
||||
: 'Threads 연결을 완료하지 못했습니다. 권한을 확인한 뒤 다시 연결해 주세요.'}</p>;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import {useCallback, useEffect, useState} from 'react';
|
||||
import {Button} from '@/components/ui/button';
|
||||
import {socialApi, postStatus, statusLabels, type SocialState} from './api';
|
||||
|
||||
export function SocialPanel({placeId}: {placeId: string}) {
|
||||
const [state, setState] = useState<SocialState | null>(null);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [message, setMessage] = useState('');
|
||||
const refresh = useCallback(async () => {
|
||||
setState(await socialApi<SocialState>(`/place/${placeId}`));
|
||||
}, [placeId]);
|
||||
useEffect(() => {
|
||||
let alive = true;
|
||||
const load = () => socialApi<SocialState>(`/place/${placeId}`).then((data) => {
|
||||
if (alive) setState(data);
|
||||
}).catch(() => {if (alive) setMessage('SNS 상태를 불러오지 못했습니다.');});
|
||||
void load();
|
||||
const interval = window.setInterval(() => {void load();}, 5000);
|
||||
return () => {alive = false; window.clearInterval(interval);};
|
||||
}, [placeId]);
|
||||
async function action(fn: () => Promise<unknown>) {
|
||||
setBusy(true); setMessage('');
|
||||
try {await fn(); await refresh();}
|
||||
catch (e) {setMessage(e instanceof Error ? e.message : '요청에 실패했습니다.'); await refresh().catch(() => {});}
|
||||
finally {setBusy(false);}
|
||||
}
|
||||
return <section className="space-y-3 rounded-xl border border-border p-4 text-sm">
|
||||
<h3 className="font-bold">Threads에 알리기</h3>
|
||||
<p className="text-xs text-muted-foreground">확인된 가게 정보로 소개글을 씁니다. 글을 복사해 직접 올릴 수도 있습니다.</p>
|
||||
{state?.account && <p>게재 계정: <strong>@{state.account.handle}</strong>
|
||||
{state.account.status === 'needs_reauth' && ' · 다시 연결해 주세요'}</p>}
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<Button size="sm" disabled={busy || !state} onClick={() => void action(() => socialApi(`/place/${placeId}/draft`, {}))}>소개글 쓰기</Button>
|
||||
{state?.connection_enabled && <Button size="sm" variant="outline" disabled={busy} onClick={() => void action(async () => {
|
||||
const result = await socialApi<{url: string}>('/oauth/connect', {});
|
||||
window.location.assign(result.url);
|
||||
})}>{state.account ? 'Threads 다시 연결' : 'Threads 계정 연결'}</Button>}
|
||||
{state?.account && <Button size="sm" variant="ghost" disabled={busy} onClick={() => void action(() => socialApi('/oauth/disconnect', {}))}>연결 해제</Button>}
|
||||
</div>
|
||||
{state && !state.posting_enabled && <p className="text-xs text-muted-foreground">자동 게재 연동을 준비 중입니다. 글 복사와 내용 확인을 이용할 수 있습니다. 지금 확인해도 계정 연결 후 다시 승인받습니다.</p>}
|
||||
<p role="status" aria-live="polite">{message}</p>
|
||||
{state?.posts.map((post) => {
|
||||
const status = postStatus(post);
|
||||
return <article key={post.post_id} className="space-y-2 rounded-lg bg-muted/40 p-3">
|
||||
<p className="font-semibold">{statusLabels[status] ?? status}</p>
|
||||
<p className="whitespace-pre-wrap break-words">{post.body}</p>
|
||||
{post.approval_expires_at && <p className="text-xs text-muted-foreground">승인 기한: {new Date(post.approval_expires_at).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'})} (한국시간)</p>}
|
||||
{post.last_error && <p className="text-xs text-destructive">{post.last_error === 'ALIMTALK_SEND_FAILED' ? '알림톡 발송 실패 · 여기서 승인할 수 있습니다.' : status === 'UNKNOWN' ? 'Threads 계정에서 실제 게재 여부를 확인해 주세요. 중복을 막기 위해 자동으로 다시 올리지 않습니다.' : '처리에 실패했습니다. 글은 보관되어 있습니다.'}</p>}
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{post.body && <Button size="sm" variant="outline" onClick={() => {
|
||||
void navigator.clipboard.writeText(post.body).then(() => setMessage('글과 홈페이지 링크를 복사했습니다.')).catch(() => setMessage('복사하지 못했습니다. 위 글을 선택해 복사해 주세요.'));
|
||||
}}>글 복사</Button>}
|
||||
{(!state.posting_enabled || state.account?.status === 'linked') && (['DRAFT', 'DECLINED', 'EXPIRED', 'FAILED'].includes(status) || (status === 'APPROVED' && !post.account_bound) || (status === 'PENDING_APPROVAL' && !!post.last_error)) && post.body && <Button size="sm" disabled={busy} onClick={() => void action(() => socialApi(`/posts/${post.post_id}/request-approval`, {}))}>{status === 'EXPIRED' ? '승인 다시 요청' : state.posting_enabled ? '게재 승인 요청' : '내용 확인 요청'}</Button>}
|
||||
{status === 'PENDING_APPROVAL' && <>
|
||||
<Button size="sm" disabled={busy} onClick={() => void action(() => socialApi(`/posts/${post.post_id}/decision`, {approve: true}))}>{post.account_bound ? '이 글을 게재할게요' : '내용을 확인했어요'}</Button>
|
||||
<Button size="sm" variant="outline" disabled={busy} onClick={() => void action(() => socialApi(`/posts/${post.post_id}/decision`, {approve: false}))}>게재하지 않기</Button>
|
||||
</>}
|
||||
{post.permalink && <a href={post.permalink} target="_blank" rel="noopener noreferrer" className="underline">SNS에 올린 글 보기</a>}
|
||||
</div>
|
||||
</article>;
|
||||
})}
|
||||
</section>;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import {getAccessToken} from '@/api';
|
||||
|
||||
export type SocialPost = {
|
||||
post_id: string; provider: number; body: string; link_url: string; status: string;
|
||||
approval_expires_at?: string; approval_channel?: string; permalink?: string;
|
||||
posted_at?: string; last_error?: string; account_handle?: string; account_bound: boolean;
|
||||
};
|
||||
export type SocialState = {
|
||||
posts: SocialPost[]; connection_enabled: boolean; posting_enabled: boolean;
|
||||
account: {handle: string; profile_url: string; status: string} | null;
|
||||
};
|
||||
const base = import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:9800';
|
||||
const messages: Record<string, string> = {
|
||||
SOCIAL_PUBLISHED_FIXED_URL_REQUIRED: '홈페이지 주소를 확정하고 발행한 뒤 이용할 수 있습니다.',
|
||||
NO_GROUNDED_FACTS: '확인된 정보가 아직 없습니다. 가게 정보를 먼저 확인해 주세요.',
|
||||
SOCIAL_POSTING_DISABLED_COPY_AVAILABLE: '자동 게재를 준비 중입니다. 글을 복사해 직접 올릴 수 있습니다.',
|
||||
ACCOUNT_CONNECTION_REQUIRED: 'Threads 계정을 먼저 연결해 주세요.',
|
||||
APPROVAL_NOTIFICATION_FAILED_SCREEN_AVAILABLE: '알림톡을 보내지 못했습니다. 아래 카드에서 승인할 수 있습니다.',
|
||||
PUBLISH_URL_CHANGED: '홈페이지 주소가 변경되었습니다. 기존 승인으로 게재할 수 없습니다.',
|
||||
APPROVAL_NOT_FOUND: '유효하지 않거나 교체된 승인 링크입니다.',
|
||||
PLACE_NOT_FOUND: '가게를 찾을 수 없습니다.',
|
||||
};
|
||||
export async function socialApi<T>(path: string, data?: unknown, publicAccess = false): Promise<T> {
|
||||
const token = publicAccess ? null : getAccessToken();
|
||||
const response = await fetch(`${base}/v1/social${path}`, {
|
||||
method: data === undefined ? 'GET' : 'POST', credentials: 'include',
|
||||
referrerPolicy: 'no-referrer', cache: 'no-store',
|
||||
headers: {'Content-Type': 'application/json', ...(token ? {Authorization: `Bearer ${token}`} : {})},
|
||||
body: data === undefined ? undefined : JSON.stringify(data),
|
||||
});
|
||||
const result = await response.json();
|
||||
if (!response.ok) throw new Error(messages[result.detail] ?? '요청을 처리하지 못했습니다. 잠시 후 다시 확인해 주세요.');
|
||||
return result as T;
|
||||
}
|
||||
export const statusLabels: Record<string, string> = {
|
||||
DRAFTING: '글 작성 중', DRAFT: '초안', PENDING_APPROVAL: '승인 대기', APPROVED: '승인 완료',
|
||||
POSTING: '게재 중', POSTED: '게재 완료', DECLINED: '게재하지 않음', EXPIRED: '승인 만료',
|
||||
FAILED: '실패', UNKNOWN: '게재 결과 확인 필요',
|
||||
};
|
||||
export function postStatus(post: SocialPost) {
|
||||
return post.status === 'PENDING_APPROVAL' && post.approval_expires_at && Date.parse(post.approval_expires_at) <= Date.now()
|
||||
? 'EXPIRED' : post.status;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import {SocialConnectionNotice} from '@/features/social/SocialConnectionNotice';
|
||||
import {useMemo, useState} from 'react';
|
||||
import {Link, useNavigate} from 'react-router';
|
||||
import {
|
||||
@@ -252,6 +253,7 @@ export function SitesPage() {
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<SocialConnectionNotice />
|
||||
{isLoading && (
|
||||
<div className="flex items-center justify-center py-20 text-muted-foreground">
|
||||
<Loader2 className="size-5 animate-spin" />
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import {useEffect, useState} from 'react';
|
||||
import {useParams, useSearchParams} from 'react-router';
|
||||
import {socialApi, postStatus, statusLabels, type SocialPost} from '@/features/social/api';
|
||||
import {Button} from '@/components/ui/button';
|
||||
|
||||
export default function SocialApprovalPage() {
|
||||
const {postId} = useParams();
|
||||
const [query] = useSearchParams();
|
||||
const token = query.get('t') ?? '';
|
||||
const [post, setPost] = useState<SocialPost | null>(null);
|
||||
const [message, setMessage] = useState('');
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [decided, setDecided] = useState(false);
|
||||
useEffect(() => {
|
||||
let active = true;
|
||||
void socialApi<SocialPost>(`/approval/${postId}?t=${encodeURIComponent(token)}`, undefined, true)
|
||||
.then((data) => {if (active) setPost(data);})
|
||||
.catch((e: Error) => {if (active) setMessage(e.message);});
|
||||
return () => {active = false;};
|
||||
}, [postId, token]);
|
||||
async function decide(approve: boolean) {
|
||||
setBusy(true);
|
||||
try {
|
||||
const result = await socialApi<{message: string}>(`/approval/${postId}/decision`, {t: token, approve}, true);
|
||||
setMessage(result.message); setDecided(true);
|
||||
} catch (e) {setMessage(e instanceof Error ? e.message : '처리하지 못했습니다.');}
|
||||
finally {setBusy(false);}
|
||||
}
|
||||
const pending = post && postStatus(post) === 'PENDING_APPROVAL' && !decided;
|
||||
return <main className="mx-auto max-w-xl space-y-6 px-5 py-12">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<h1 className="text-2xl font-bold">이 글을 Threads에 게재할까요?</h1>
|
||||
{post && <>
|
||||
<p>{post.account_bound ? <>게재 계정: <strong>@{post.account_handle}</strong></> : <>자동 게재 연결 전입니다. 지금은 내용만 확인하며, 계정 연결 후 다시 승인을 받습니다.</>}</p>
|
||||
<p className="whitespace-pre-wrap break-words rounded-xl border p-5">{post.body}</p>
|
||||
<a href={post.link_url} target="_blank" rel="noreferrer noopener" referrerPolicy="no-referrer" className="underline">홈페이지 확인하기</a>
|
||||
<p>게시글은 홈페이지에도 소식으로 남습니다. Threads에서 삭제해도 홈페이지의 소식은 자동 삭제되지 않습니다.</p>
|
||||
<p className="text-sm">{statusLabels[postStatus(post)]}{post.approval_expires_at && ` · ${new Date(post.approval_expires_at).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'})} (한국시간)까지`}</p>
|
||||
{pending && <div className="flex gap-3">
|
||||
<Button disabled={busy} onClick={() => void decide(true)}>{post.account_bound ? '예, 이 글을 게재할게요' : '내용을 확인했어요'}</Button>
|
||||
<Button variant="outline" disabled={busy} onClick={() => void decide(false)}>게재하지 않기</Button>
|
||||
</div>}
|
||||
</>}
|
||||
<p role="status" aria-live="polite">{message || (!post ? '소개글을 불러오는 중입니다.' : '')}</p>
|
||||
</main>;
|
||||
}
|
||||
@@ -12,6 +12,7 @@ export default [
|
||||
// (2026-09-04, 사장님 지적: 로그인하면 랜딩·요금에 갈 길이 없었다).
|
||||
index('pages/LandingPage.tsx'),
|
||||
|
||||
route('approve/:postId', 'pages/SocialApprovalPage.tsx'),
|
||||
route('login', 'pages/LoginPage.tsx'),
|
||||
// 로그인 화면의 [회원가입] 이 여기로 온다. 이 줄이 없으면 링크는 있고 목적지만 404 다.
|
||||
route('signup', 'pages/SignupPage.tsx'),
|
||||
|
||||
Reference in new issue
Block a user