You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/ts/components/SessionMainPanel.tsx

43 lines
1019 B
TypeScript

import React from 'react';
import { DefaultTheme } from 'styled-components';
import { SmartSessionConversation } from '../state/smart/SessionConversation';
import {
SessionSettingCategory,
SmartSettingsView,
} from './session/settings/SessionSettings';
const FilteredSettingsView = SmartSettingsView as any;
interface Props {
focusedSettingsSection?: SessionSettingCategory;
}
export class SessionMainPanel extends React.Component<Props> {
public constructor(props: Props) {
super(props);
}
public render() {
const isSettingsView = this.props.focusedSettingsSection !== undefined;
return isSettingsView
? this.renderSettings()
: this.renderSessionConversation();
}
private renderSettings() {
const category = this.props.focusedSettingsSection;
return <FilteredSettingsView category={category} />;
}
private renderSessionConversation() {
return (
<div className="session-conversation">
<SmartSessionConversation />
</div>
);
}
}