Skip to content

Commit 9630d8e

Browse files
committed
fix comments on the PR
1 parent 0b69bde commit 9630d8e

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

samples/musicfestival-frontend-react/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { BlockPage } from './pages/BlockPage';
1616

1717
let previousSavedMessage: any = null;
1818
const singleKeyUrl = process.env.REACT_APP_CONTENT_GRAPH_GATEWAY_URL as string
19-
const hmacKeyUrl = process.env.REACT_APP_CG_PREVIEW_URL as string
19+
const previewUrl = process.env.REACT_APP_CG_PREVIEW_URL as string
2020

2121
const App = () => {
2222
const queryClient = useQueryClient();
@@ -43,7 +43,7 @@ const App = () => {
4343
if (previewToken) {
4444
headers = { 'Authorization': 'Bearer ' + previewToken };
4545
}
46-
url = hmacKeyUrl
46+
url = previewUrl
4747
subcribeContentSavedEvent((message: any) => mutate(message))
4848
}
4949

samples/musicfestival-frontend-react/src/helpers/urlHelper.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ const getImageUrl = (path = "") => {
1818
}
1919

2020
const extractParams = (token: string, urlPath: string) => {
21-
var payload: Payload = {
22-
c_id: undefined,
23-
c_ver: undefined
24-
};
21+
var payload: Payload = {};
2522

2623
if (token) {
27-
const base64String = token.substring(token.indexOf('.') + 1, token.lastIndexOf('.'));
24+
const base64String = token.split('.')[1]
2825
payload = JSON.parse(Buffer.from(base64String, 'base64').toString());
2926
}
3027

samples/musicfestival-frontend-react/src/pages/SearchPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { subcribeContentSavedEvent } from "../helpers/contentSavedEvent";
2121

2222
let previousSavedMessage: any = null;
2323
const singleKeyUrl = process.env.REACT_APP_CONTENT_GRAPH_GATEWAY_URL as string
24-
const hmacKeyUrl = process.env.REACT_APP_CG_PREVIEW_URL as string
24+
const previewUrl = process.env.REACT_APP_CG_PREVIEW_URL as string
2525

2626
function SearchPage() {
2727
console.log("Start")
@@ -80,7 +80,7 @@ function SearchPage() {
8080
if (token) {
8181
headers = { 'Authorization': 'Bearer ' + token }
8282
}
83-
url = hmacKeyUrl
83+
url = previewUrl
8484
subcribeContentSavedEvent((message: any) => mutate(message))
8585
}
8686

0 commit comments

Comments
 (0)