import { View, Text, Button } from "@tarojs/components"; import Taro from "@tarojs/taro"; import type { RuntimeWorkspace } from "@personal-brand/types"; import { presentation, object, text } from "../runtime/content"; import { brandSlug } from "../runtime/api"; import { navigate } from "../runtime/navigation"; export function Success({ workspace, preview = false, }: { workspace: RuntimeWorkspace; preview?: boolean; }) { const p = presentation(workspace, "success"); const submitted = preview || Boolean(text(object(Taro.getStorageSync(`latestInquiry:${brandSlug()}`)).id)); if (!submitted) return ( 尚未提交咨询 ); return ( ✓ {p.eyebrow} {p.title || "已收到你的需求"} {p.intro} ); }