fix: Websocket reconnect when navigating from settings -> home

This commit is contained in:
Tom Moor
2020-08-14 17:47:12 -07:00
parent 31910f1628
commit df9b0bcf91
2 changed files with 5 additions and 7 deletions

View File

@ -40,7 +40,7 @@ type Props = {
@observer @observer
class SettingsSidebar extends React.Component<Props> { class SettingsSidebar extends React.Component<Props> {
returnToDashboard = () => { returnToDashboard = () => {
this.props.history.push("/"); this.props.history.push("/home");
}; };
render() { render() {

View File

@ -1,16 +1,15 @@
// @flow // @flow
import { ExpandedIcon } from "outline-icons"; import { ExpandedIcon } from "outline-icons";
import * as React from "react"; import * as React from "react";
import styled, { withTheme } from "styled-components"; import styled from "styled-components";
import Flex from "components/Flex"; import Flex from "components/Flex";
import TeamLogo from "components/TeamLogo"; import TeamLogo from "components/TeamLogo";
type Props = { type Props = {
teamName: string, teamName: string,
subheading: string, subheading: React.Node,
showDisclosure?: boolean, showDisclosure?: boolean,
logoUrl: string, logoUrl: string,
theme: Object,
}; };
function HeaderBlock({ function HeaderBlock({
@ -18,7 +17,6 @@ function HeaderBlock({
teamName, teamName,
subheading, subheading,
logoUrl, logoUrl,
theme,
...rest ...rest
}: Props) { }: Props) {
return ( return (
@ -27,7 +25,7 @@ function HeaderBlock({
<Flex align="flex-start" column> <Flex align="flex-start" column>
<TeamName showDisclosure> <TeamName showDisclosure>
{teamName}{" "} {teamName}{" "}
{showDisclosure && <StyledExpandedIcon color={theme.text} />} {showDisclosure && <StyledExpandedIcon color="currentColor" />}
</TeamName> </TeamName>
<Subheading>{subheading}</Subheading> <Subheading>{subheading}</Subheading>
</Flex> </Flex>
@ -73,4 +71,4 @@ const Header = styled(Flex)`
} }
`; `;
export default withTheme(HeaderBlock); export default HeaderBlock;