이름: solution/front → solution/frontend

`backend` 옆에 `front` 가 있을 이유가 없었다. negosium 의 negodata/front 를 그대로
베꼈고 그게 왜 front 인지는 따져보지 않았다 — 근거 없이 들여온 이름이라 바로잡는다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019uYhHQdssRubirPirrdJJC
This commit is contained in:
minaChoiandClaude Opus 5 committed 2026-08-31 15:27:16 +09:00
1 parent 06f6438d9b
commit c85c577349
480 files changed
+22 -22

No files matched your search

@@ -0,0 +1,114 @@
import {ExternalLink, Link2, Loader2, MapPin} from 'lucide-react';
import {Button} from '@/components/ui/button';
import {Input} from '@/components/ui/input';
import {cn} from '@/lib/utils';
/**
* 자동 상호 검색이 실패했을 때 네이버 지도에서 직접 찾아 URL로 확정하는 fallback.
*
* ★ 왜 이 fallback 이 필요한가
* 상호 검색은 동명 업소·지점명 표기 차이에서 실패한다(실측: '롯데호텔 서울').
* 검색모델(Perplexity)은 네이버 플레이스를 아예 못 찾고 안내 페이지를 물어온 적도 있다.
* 반면 사장님은 자기 가게 주소를 이미 안다 — 붙여넣는 순간 신원과 수집 채널이 동시에
* 확정되고, 상호·주소·좌표는 서버가 그 URL 에서 직접 읽는다.
* (선례: o2o-castad 도 네이버 지도 URL 직접 입력을 주 경로로 둔다.)
*/
export function PlaceUrlBox({
value,
onChange,
onSubmit,
isBusy,
compact,
searchQuery,
}: {
value: string;
onChange: (next: string) => void;
onSubmit: () => void;
isBusy?: boolean;
/** 후보 목록 아래에 놓일 때는 설명을 줄인다. */
compact?: boolean;
/** 자동 검색 실패 시 네이버 지도를 이 검색어로 바로 연다. */
searchQuery?: string;
}) {
const isNaverUrl = /naver\.(com|me)/i.test(value);
const mapSearchUrl = searchQuery?.trim()
? `https://map.naver.com/p/search/${encodeURIComponent(searchQuery.trim())}`
: 'https://map.naver.com/';
return (
<div
className={cn(
'rounded-2xl border bg-card p-5',
compact ? 'border-border' : 'border-primary/40 ring-2 ring-primary/10',
)}
>
<p className="flex items-center gap-1.5 text-sm font-bold">
<MapPin className="size-4 text-primary" />
네이버 플레이스에서 직접 찾기
{!compact && (
<span className="rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary">
가장 정확
</span>
)}
</p>
{!compact && (
<>
<p className="mt-2 text-[11px] leading-relaxed text-muted-foreground">
자동 검색에서 찾지 못했습니다. 네이버 지도에서 내 가게를 연 뒤 [공유] 주소를
복사해 아래에 붙여넣어 주세요.
</p>
</>
)}
<a
href={mapSearchUrl}
target="_blank"
rel="noopener noreferrer"
className="mt-3 flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-background px-3 py-2 text-xs font-semibold transition-colors hover:bg-accent"
>
<ExternalLink className="size-3.5" />
<span>
네이버 지도에서{' '}
{searchQuery?.trim()
? `'${searchQuery.trim()}' 검색`
: compact
? '이 상호 다시 찾기'
: '검색'}
</span>
</a>
<div className="mt-3 flex items-center gap-1.5">
<Input
value={value}
onChange={(e) => onChange(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter' && value.trim()) onSubmit();
}}
placeholder="https://map.naver.com/p/entry/place/1133638931"
disabled={isBusy}
/>
<Button
variant="primary"
onClick={onSubmit}
disabled={isBusy || !value.trim()}
className="shrink-0"
>
{isBusy ? <Loader2 className="animate-spin" /> : <Link2 />}
<span>확인</span>
</Button>
</div>
<p
className={cn(
'mt-1.5 text-[11px]',
value.trim() && !isNaverUrl ? 'text-destructive' : 'text-muted-foreground',
)}
>
{value.trim() && !isNaverUrl
? '네이버 지도·플레이스 주소를 붙여넣어 주세요.'
: 'map.naver.com · m.place.naver.com · naver.me 주소를 지원합니다.'}
</p>
</div>
);
}