scripting added
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 8s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 8s
This commit is contained in:
33
frontend/src/pages/Scripting.tsx
Normal file
33
frontend/src/pages/Scripting.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Card, Tabs } from 'antd';
|
||||
import { useState } from 'react';
|
||||
import PythonEditor from '../components/PythonEditor';
|
||||
|
||||
const TwoTabsPage: React.FC = () => {
|
||||
const [code, setCode] = useState<string>("print('hello world')\n");
|
||||
|
||||
const tabItems = [
|
||||
{
|
||||
key: '1',
|
||||
label: 'Saved Scripts',
|
||||
children: <></>,
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: 'Custom Script',
|
||||
children: (
|
||||
<div>
|
||||
<h3>Python Editor</h3>
|
||||
<PythonEditor value={code} onChange={setCode} />
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Card style={{ width: '100%' }}>
|
||||
<Tabs defaultActiveKey="1" items={tabItems} />
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default TwoTabsPage;
|
||||
Reference in New Issue
Block a user