diff --git a/app/components/assets/detail/customer-view.tsx b/app/components/assets/detail/customer-view.tsx new file mode 100644 index 0000000..9cec1b7 --- /dev/null +++ b/app/components/assets/detail/customer-view.tsx @@ -0,0 +1,36 @@ +import { ArPagePreview } from '~/components/ui/ar-page-preview'; +import { Card } from '~/components/ui/card'; +import { ModelViewer } from '~/components/ui/model-viewer'; +import { Text } from '~/components/ui/text'; +import { useAdminData } from '~/hooks/admin/use-admin-data'; +import { useModelViewerReady } from '~/hooks/use-model-viewer-ready'; +import { getArPageLayout, getButtonStyle, getGlbUrl, getUsdzUrl, toBrand } from '~/services/asset-media'; +import type { ArAsset } from '~/types/asset'; + +// What a customer sees after scanning the QR, with the real 3D model +export function CustomerView({ asset }: { asset: ArAsset }) { + const { settings } = useAdminData(); + const ready = useModelViewerReady(); + const project = asset.expand?.project; + const glbUrl = getGlbUrl(asset); + + return ( + +
+ Customer view + After scanning the QR +
+ + {ready && glbUrl ? ( + + ) : undefined} + +
+ ); +}