Skip to content
Snippets Groups Projects
Unverified Commit 884d5d1f authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix behavior for settings without the default value (#23917)

parent e889bc4a
Branches
Tags
No related merge requests found
......@@ -47,8 +47,8 @@ export interface Settings {
"show-homepage-data": boolean;
"show-homepage-xrays": boolean;
"show-homepage-pin-message": boolean;
"show-lighthouse-illustration": boolean;
"show-metabot": boolean;
"show-lighthouse-illustration": boolean | null;
"show-metabot": boolean | null;
"slack-token": string | undefined;
"slack-token-valid?": boolean;
"slack-app-token": string | undefined;
......
......@@ -3,7 +3,8 @@ import AuthLayout from "../../components/AuthLayout";
import { State } from "metabase-types/store";
const mapStateToProps = (state: State) => ({
showIllustration: state.settings.values["show-lighthouse-illustration"],
showIllustration:
state.settings.values["show-lighthouse-illustration"] ?? true,
});
export default connect(mapStateToProps)(AuthLayout);
......@@ -5,7 +5,7 @@ import HomeGreeting from "../../components/HomeGreeting";
const mapStateToProps = (state: State) => ({
user: getUser(state),
showLogo: state.settings.values["show-metabot"],
showLogo: state.settings.values["show-metabot"] ?? true,
});
export default connect(mapStateToProps)(HomeGreeting);
......@@ -3,7 +3,8 @@ import { State } from "metabase-types/store";
import HomeLayout from "../../components/HomeLayout";
const mapStateToProps = (state: State) => ({
showIllustration: state.settings.values["show-lighthouse-illustration"],
showIllustration:
state.settings.values["show-lighthouse-illustration"] ?? true,
});
export default connect(mapStateToProps)(HomeLayout);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment