fix: Websocket reconnect when navigating from settings -> home
This commit is contained in:
@ -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() {
|
||||||
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user