Skip to content

Commit

Permalink
flag SnapWebview to not load if basic functionality isn't ON
Browse files Browse the repository at this point in the history
  • Loading branch information
JSoufer committed Aug 16, 2024
1 parent c354059 commit 44a1a2a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ const VaultRecoveryFlow = () => (
);

// eslint-disable-next-line react/prop-types
const App = ({ userLoggedIn }) => {
const App = ({ userLoggedIn, isBasicFunctionalityEnabled }) => {
const animationRef = useRef(null);
const animationNameRef = useRef(null);
const opacity = useRef(new Animated.Value(1)).current;
Expand Down Expand Up @@ -811,9 +811,11 @@ const App = ({ userLoggedIn }) => {
{
///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps)
}
<View>
<SnapsExecutionWebView />
</View>
{isBasicFunctionalityEnabled && (
<View>
<SnapsExecutionWebView />
</View>
)}
{
///: END:ONLY_INCLUDE_IF
}
Expand Down Expand Up @@ -950,6 +952,7 @@ const App = ({ userLoggedIn }) => {

const mapStateToProps = (state) => ({
userLoggedIn: state.user.userLoggedIn,
isBasicFunctionalityEnabled: state.settings?.basicFunctionalityEnabled,
});

export default connect(mapStateToProps)(App);

0 comments on commit 44a1a2a

Please sign in to comment.