Skip to content

Commit

Permalink
Merge pull request #26 from guardian/da_help_two
Browse files Browse the repository at this point in the history
More Robust Link
  • Loading branch information
Dala0 authored Dec 18, 2024
2 parents 778e012 + 05cf65b commit 3c6a0c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@guardian/pluto-headers",
"version": "2.1.0",
"version": "2.1.1",
"description": "Header components for pluto",
"repository": "git://github.com/guardian/pluto-headers",
"main": "build/index",
Expand Down
13 changes: 8 additions & 5 deletions src/components/AppSwitcher/LoginComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ const LoginComponent:React.FC<LoginComponentProps> = (props) => {
};

const toggleThemeMode = ()=>themeContext.changeDarkMode(!themeContext.darkMode);
const openDocs = ()=> window.open(
"pluto-core/help",
"_blank"
)

const usernameFromProfile = ()=>{
if(userContext.profile) {
Expand Down Expand Up @@ -172,7 +168,14 @@ const LoginComponent:React.FC<LoginComponentProps> = (props) => {
className="help-button"
variant="outlined"
size="small"
onClick={openDocs}
onClick={() => {
const currentURI = new URL(window.location.href);
const linkURL = currentURI.protocol + "//" + currentURI.host + "/pluto-core/help";
window.open(
linkURL,
"_blank"
)
}}
style={{ marginLeft: "10px", borderColor: "black", color: "black" }}
>
Help
Expand Down

0 comments on commit 3c6a0c0

Please sign in to comment.