Skip to content

Commit

Permalink
fix(Portal): update hostname
Browse files Browse the repository at this point in the history
* poc map v2 with components added

* remove console.log

* edit on json mock

* update collui import

* update hostname

Co-authored-by: Niklas Westman <[email protected]>
  • Loading branch information
niklas-westman and Niklas Westman authored Nov 26, 2020
1 parent df05efb commit ccc762f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/v2/Portal/Portal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { useEffect, useState, useCallback } from 'react';
import { Link } from 'react-router-dom';
import { getIconBy, svg } from './portalIcons';

export const Portal: React.FC<{ menuItems: null; hostname: string; nrOfUnreadMessages?: number }> = ({
export const Portal: React.FC<{ menuItems: null; nrOfUnreadMessages?: number }> = ({
menuItems,
hostname,
children,
nrOfUnreadMessages,
}) => {
const hostname = window.location.hostname;
const [toplevelDropdownIndex, setToplevelDropdownIndex] = useState(-1);
const [toplevelChildUrl, setToplevelChildUrl] = useState<string | null>(null);
const [toplevelUrl, setToplevelUrl] = useState<string | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion src/components/v2/Portal/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ components.addDecorator(withKnobs);
components.add('Portal', () => {
return (
<BrowserRouter>
<Portal menuItems={menuItems} hostname={window.location.hostname}>
<Portal menuItems={menuItems}>
Content
</Portal>
</BrowserRouter>
Expand Down
1 change: 1 addition & 0 deletions src/components/v2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Portal/Portal';

0 comments on commit ccc762f

Please sign in to comment.