Skip to content

Commit

Permalink
fix: Extension inbuilt hash routing watcher with core
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Oct 4, 2023
1 parent 45a6cb9 commit 97d3892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 8 additions & 0 deletions src/components/extension/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ export default function ExtensionRenderer() {
return
}
)

iframeElement.contentWindow.addEventListener(
"limanHashChange",
function (e: any) {
// Change the hash of the parent window with e.detail data
window.location.hash = e.detail
}
)
}

const onHashChanged = () => {
Expand Down
9 changes: 2 additions & 7 deletions src/services/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,13 @@ export class ApiService {
return response
},
(error) => {
if (error.response.status === 401) {
if (error.response && error.response.status === 401) {
window.location.href =
"/auth/login?redirect=" + window.location.pathname
}
if (error.response.status === 504) {
if (error.response && error.response.status === 504) {
window.location.href = "/504"
}
/*
if (error.response.status === 403) {
window.location.href = "/403"
}
*/
return Promise.reject(error)
}
)
Expand Down

0 comments on commit 97d3892

Please sign in to comment.