Skip to content

Commit

Permalink
add link to giveaway after retry attempted
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilBastian committed Jan 30, 2025
1 parent 21aa6d9 commit af590de
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ShippingEndpoint from "./components/ShippingEndpoint.vue";
import TryItOut from "./components/guideline/TryItOut.vue";
import FloatingButton from "./components/FloatingButton.vue";
import { ref } from "vue";
import { store } from "./components/shared";
const tab = ref("showcase");
</script>
Expand All @@ -32,6 +33,12 @@ const tab = ref("showcase");
<div class="container">
<div v-show="tab === 'showcase'">
<h2>Simulating customers placing orders on a website</h2>
<div v-if="store.messageRetried">
Thanks for trying our showcase. You are eligible to enter our
<a href="https://gleam.io/competitions/ViON2-rabbitmq-mastery-giveaway">
giveaway
</a>
</div>
<div class="architecture-diagram"></div>
<div class="sections">
<div><ClientEndpoint /></div>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ body {

/* Heading Styles */
h2 {
font-size: 1.8rem;
font-size: 1.3rem;
color: #2c3e50;
margin-bottom: 1rem;
margin-bottom: 0.5rem;
}

.red {
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/components/BillingEndpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ connection.on("OrderBilled", (order: Order) => {
});
connection.on("RetryAttempted", () => {
try {
store.setMessageRetried();
GA4.showcaseRetryAttempted();
} catch (e) {
console.error(e);
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/components/SalesEndpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ connection.on("SyncValues", (processed, errored, failRetries) => {
});
connection.on("RetryAttempted", () => {
try {
store.setMessageRetried();
GA4.showcaseRetryAttempted();
} catch (e) {
console.error(e);
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/components/ShippingEndpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ connection.on(
);
connection.on("RetryAttempted", () => {
try {
store.setMessageRetried();
GA4.showcaseRetryAttempted();
} catch (e) {
console.error(e);
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/components/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ export const store = reactive({
clearSelectedMessage() {
this.selectedMessage = "";
},
messageRetried: false,
setMessageRetried() {
this.messageRetried = true;
},
});

0 comments on commit af590de

Please sign in to comment.