<commit_before>/**
 * settings_view.js
 * @flow
 */

import React from "react";
import { Tabs } from "antd";
import Model from "oxalis/model";
import UserSettingsView from "oxalis/view/settings/user_settings_view";
import DatasetSettingsView from "oxalis/view/settings/dataset_settings_view";

const TabPane = Tabs.TabPane;

const SettingsView = ({ oldModel, isPublicViewMode }:{oldModel: Model, isPublicViewMode: boolean}) =>
  <Tabs defaultActiveKey="1">
    <TabPane tab="Tracing" key="1"><UserSettingsView oldModel={oldModel} isPublicViewMode={isPublicViewMode} /></TabPane>
    <TabPane tab="Dataset" key="2"><DatasetSettingsView /></TabPane>
  </Tabs>;

export default SettingsView;<commit_msg>prevent inactive tabs from rendering #1709<commit_after>/**
 * settings_view.js
 * @flow
 */

import React from "react";
import { Tabs } from "antd";
import Model from "oxalis/model";
import UserSettingsView from "oxalis/view/settings/user_settings_view";
import DatasetSettingsView from "oxalis/view/settings/dataset_settings_view";

const TabPane = Tabs.TabPane;

const SettingsView = ({ oldModel, isPublicViewMode }:{oldModel: Model, isPublicViewMode: boolean}) =>
  <Tabs defaultActiveKey="1" destroyInactiveTabPane={true}>
    <TabPane tab="Tracing" key="1"><UserSettingsView oldModel={oldModel} isPublicViewMode={isPublicViewMode} /></TabPane>
    <TabPane tab="Dataset" key="2"><DatasetSettingsView /></TabPane>
  </Tabs>;

export default SettingsView;
{'fraction_non_alphanumeric': 0.135709389993146, 'fraction_numerical': 0.006854009595613434, 'mean_word_length': 6.564766839378239, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7148758', 'n_tokens_mistral': 452, 'n_tokens_neox': 446, 'n_words': 105}