Add product source job resolver
This commit is contained in:
@@ -14,11 +14,11 @@ import type { FocusEvent } from '../types/channel';
|
||||
import styles from './PublicDisplayPage.module.css';
|
||||
|
||||
interface PublicDisplayPageProps {
|
||||
cloudId: string;
|
||||
productId: string;
|
||||
}
|
||||
|
||||
export function PublicDisplayPage({ cloudId }: PublicDisplayPageProps) {
|
||||
const cloudState = useCloud(cloudId);
|
||||
export function PublicDisplayPage({ productId }: PublicDisplayPageProps) {
|
||||
const cloudState = useCloud(productId);
|
||||
const cloud = cloudState.cloud;
|
||||
const queue = useFocusQueue();
|
||||
const focus = useWordCloudFocus({
|
||||
@@ -33,7 +33,7 @@ export function PublicDisplayPage({ cloudId }: PublicDisplayPageProps) {
|
||||
},
|
||||
[queue],
|
||||
);
|
||||
useWordCloudChannel(cloudId, receiveMessage);
|
||||
useWordCloudChannel(productId, receiveMessage);
|
||||
|
||||
useEffect(() => {
|
||||
if (!queue.current || focus.phase !== 'idle' || !cloud) {
|
||||
@@ -81,7 +81,7 @@ export function PublicDisplayPage({ cloudId }: PublicDisplayPageProps) {
|
||||
layered
|
||||
/>
|
||||
<p className={styles.caption}>{cloud.caption}</p>
|
||||
<QRPanel cloudId={cloudId} />
|
||||
<QRPanel productId={productId} />
|
||||
<FullscreenButton />
|
||||
</main>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user