Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from solo-io/charlesthebird/glooGatewayPortalSe…
Browse files Browse the repository at this point in the history
…rverSupport

fix for going between apis and home pages
  • Loading branch information
Charlesthebird authored Jun 12, 2024
2 parents ce164d8 + 0c3f8cf commit 4f37b8d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ interface IPortalAppContext extends PortalAppProviderProps {
export const PortalAppContext = createContext({} as IPortalAppContext);

export const PortalAppContextProvider = (props: PortalAppProviderProps) => {
const [portalServerType, setPortalServerType] =
useState<PortalServerType>('unknown');
const [portalServerType, setPortalServerType] = useState<PortalServerType>(
(window as any)._gppp_portal_server_type ?? 'unknown',
);

return (
<PortalAppContext.Provider
value={{
portalServerType,
updatePortalServerType: t => {
customLog('Updating portal server type: ', t);
(window as any)._gppp_portal_server_type = t;
setPortalServerType(t);
},
}}
Expand Down

0 comments on commit 4f37b8d

Please sign in to comment.