Skip to content

Commit

Permalink
Revert "Updated Dropdown"
Browse files Browse the repository at this point in the history
This reverts commit 2855ef1.
  • Loading branch information
EdgarAllan-Bro committed Oct 15, 2024
1 parent 2855ef1 commit f739ea6
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions frontend/src/components/select-server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import GetApiServerUri from './helpers';
import IsManager from './is_manager';
import TornjakApi from './tornjak-api-helpers';
import './style.css';
import { Dropdown } from 'carbon-components-react';

import {
serverSelectedFunc,
Expand Down Expand Up @@ -113,7 +112,6 @@ class SelectServer extends Component<SelectServerProp, SelectServerState> {
}
}

/*
onServerSelect(e: { target: { value: string; }; } | undefined) {
if (e === undefined) {
return;
Expand All @@ -123,14 +121,6 @@ class SelectServer extends Component<SelectServerProp, SelectServerState> {
this.props.serverSelectedFunc(serverName);
}
}
*/

onServerSelect = ({ selectedItem }: { selectedItem: string }) => {
if (selectedItem) {
this.props.serverSelectedFunc(selectedItem);
}
};


getServer(serverName: string) {
var i;
Expand All @@ -144,7 +134,6 @@ class SelectServer extends Component<SelectServerProp, SelectServerState> {
return null
}

/*
render() {
let managerServerSelector = (
<div className="server-select-dropdown">
Expand All @@ -166,28 +155,6 @@ class SelectServer extends Component<SelectServerProp, SelectServerState> {
</div>
)
}
*/

render() {
const items = this.props.globalServersList
? this.props.globalServersList.map((server) => server.name)
: [];

let managerServerSelector = (
<div className="server-select-dropdown">
<Dropdown
id="server-dropdown"
titleText="Choose a Server"
label="Select an Option"
items={items}
selectedItem={this.props.globalServerSelected}
onChange={this.onServerSelect}
style={{ width: '300px' }}
/>
</div>
);
return <div>{IsManager && managerServerSelector}</div>;
}
}

const mapStateToProps = (state: RootState) => ({
Expand Down

0 comments on commit f739ea6

Please sign in to comment.