Skip to content

Commit

Permalink
feat: handle open new browser window on link
Browse files Browse the repository at this point in the history
  • Loading branch information
zamitto committed Jan 5, 2025
1 parent 0adcc73 commit 74d4975
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/services/window-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ export class WindowManager {
WindowManager.mainWindow?.setProgressBar(-1);
WindowManager.mainWindow = null;
});

this.mainWindow.webContents.setWindowOpenHandler((handler) => {
shell.openExternal(handler.url);
return { action: "deny" };
});
}

public static openAuthWindow() {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/sidebar/sidebar-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function SidebarProfile() {
return;
}

navigate(`/profile/${userDetails!.id}`);
navigate(`/profile/${userDetails.id}`);
};

useEffect(() => {
Expand Down

0 comments on commit 74d4975

Please sign in to comment.