openreplay/frontend/app/components/shared/DevTools/TabSelector.tsx
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

28 lines
689 B
TypeScript

import React from 'react';
import { Segmented } from 'antd';
import { useStore } from 'App/mstore';
import { observer } from 'mobx-react-lite';
function TabSelector() {
const { uiPlayerStore } = useStore();
const currentValue = uiPlayerStore.dataSource;
const options = [
{ label: 'All Tabs', value: 'all' },
{ label: 'Current Tab', value: 'current' },
];
const onChange = (value: 'all' | 'current') => {
uiPlayerStore.changeDataSource(value);
};
return (
<Segmented
options={options}
value={currentValue}
onChange={onChange}
className="font-medium rounded-lg"
size="small"
/>
);
}
export default observer(TabSelector);