import React from 'react' ; import { Route , Switch } from 'react-router-dom' ; import { useValues } from 'kea' ; import { AppLogic } from '../../../../app_logic' ; import { DISPLAY_SETTINGS_RESULT_DETAIL_PATH , DISPLAY_SETTINGS_SEARCH_RESULT_PATH , getSourcesPath , } from '../../../../routes' ; import { DisplaySettings } from './display_settings' ; export const DisplaySettingsRouter = ( ) => { const { isOrganization } = useValues ( AppLogic ) ; return ( < Switch > < Route exact path = { getSourcesPath ( DISPLAY_SETTINGS_SEARCH_RESULT_PATH , isOrganization ) } > < DisplaySettings tabId = { 0 } /> < /Route> < Route exact path = { getSourcesPath ( DISPLAY_SETTINGS_RESULT_DETAIL_PATH , isOrganization ) } > < DisplaySettings tabId = { 1 } /> < /Route> < /Switch>); } ;