Skip to content

Commit 6b44a4e

Browse files
authored
Update banner (#556)
* fix: remove unnecessary options from assertIndexesAndConstraints calls * feat: update banner link and add tracking for banner link clicks
1 parent 6e2cad7 commit 6b44a4e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/analytics/tracking.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ class Tracking {
138138
});
139139
};
140140

141+
public trackBannerLinkClick = () => {
142+
this.fireTrackingEvent("TB", "BANNER_LINK_CLICK", {});
143+
};
144+
141145
private getScreenValue = (screenValue: Screen): string => {
142146
return screenValue === Screen.EDITOR ? "query editor" : "type definitions";
143147
};

src/modules/Main/Main.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { NeedleThemeProvider } from "@neo4j-ndl/react";
2424
import type { GraphQLSchema } from "graphql";
2525

2626
import { invokeSegmentAnalytics } from "../../analytics/segment-snippet";
27+
import { tracking } from "../../analytics/tracking";
2728
import { CannySDK } from "../../common/canny";
2829
import { ViewSelector } from "../../components/ViewSelector";
2930
import { AuthContext } from "../../contexts/auth";
@@ -70,14 +71,17 @@ export const Main = () => {
7071
const Banner = () => {
7172
return (
7273
<div className="h-8 w-full bg-lavender-45 text-neutral-10 text-center leading-8">
73-
Win $250 by testing the GraphQL for Neo4j AuraDB.{` `}
74+
GraphQL for Neo4j AuraDB is now released.{` `}
7475
<a
75-
href="https://neo4j.com/developer-blog/build-conways-game-of-life/"
76+
href="https://neo4j.com/docs/graphql/current/aura-graphql/"
7677
className="underline"
7778
target="_blank"
7879
rel="noreferrer"
80+
onClick={() => {
81+
tracking.trackBannerLinkClick();
82+
}}
7983
>
80-
See Developer Blog for details
84+
See Developer documentation for details
8185
</a>
8286
.
8387
</div>

src/modules/SchemaView/SchemaView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ export const SchemaView = ({ onSchemaChange }: Props) => {
144144
}
145145

146146
if (useStore.getState().constraint === ConstraintState.check.toString()) {
147-
await neoSchema.assertIndexesAndConstraints({ driver: auth.driver, options: { create: false } });
147+
await neoSchema.assertIndexesAndConstraints({ driver: auth.driver });
148148
}
149149

150150
if (useStore.getState().constraint === ConstraintState.create.toString()) {
151-
await neoSchema.assertIndexesAndConstraints({ driver: auth.driver, options: { create: true } });
151+
await neoSchema.assertIndexesAndConstraints({ driver: auth.driver });
152152
}
153153

154154
const analyticsResults = rudimentaryTypeDefinitionsAnalytics(typeDefs);

0 commit comments

Comments
 (0)