Skip to content

Commit ea1b2cf

Browse files
committed
one more
1 parent cc09776 commit ea1b2cf

1 file changed

Lines changed: 14 additions & 19 deletions

File tree

packages/browser-sdk/index.html

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,22 @@
5454
document.getElementById("loading").style.display = "none";
5555
});
5656

57-
const checkHook = {
58-
type: "check-is-enabled",
59-
callback: (check) => console.log(`Check event for ${check.key}`),
60-
};
61-
bucket.on(checkHook);
57+
bucket.on("check-is-enabled", (check) =>
58+
console.log(`Check event for ${check.key}`),
59+
);
6260

63-
bucket.on({
64-
type: "features-updated",
65-
callback: (features) => {
66-
console.log("Features updated");
67-
const feature = bucket.getFeature(featureKey);
61+
bucket.on("features-updated", (features) => {
62+
console.log("Features updated");
63+
const feature = bucket.getFeature(featureKey);
6864

69-
const startHuddleElem = document.getElementById("start-huddle");
70-
if (feature.isEnabled) {
71-
// show the start-huddle button
72-
if (startHuddleElem) startHuddleElem.style.display = "block";
73-
} else {
74-
// hide the start-huddle button
75-
if (startHuddleElem) startHuddleElem.style.display = "none";
76-
}
77-
},
65+
const startHuddleElem = document.getElementById("start-huddle");
66+
if (feature.isEnabled) {
67+
// show the start-huddle button
68+
if (startHuddleElem) startHuddleElem.style.display = "block";
69+
} else {
70+
// hide the start-huddle button
71+
if (startHuddleElem) startHuddleElem.style.display = "none";
72+
}
7873
});
7974
</script>
8075
</body>

0 commit comments

Comments
 (0)