openreplay/frontend/app/dev/components/ErrorGenPanel.tsx
Shekar Siri 8d1bf1a401
change(ui): module settings and nav changes (#1443)
* change(ui): route refactor

* change(ui): new navigation

* change(ui): new navigation - icons and other fixes

* change(ui): modules

* change(ui): moduels and nav fixes
2023-08-09 12:07:57 +05:30

31 lines
No EOL
1 KiB
TypeScript

import React, { useState } from 'react';
import CrashReactAppButton from './CrashReactAppButton';
import EventErrorButton from './EventErrorButton';
import MemoryCrushButton from './MemoryCrushButton';
import PromiseErrorButton from './PromiseErrorButton';
import EvalErrorBtn from './EvalErrorBtn';
import InternalErrorButton from './InternalErrorButton';
import { options } from '../console';
import { Popover, Button } from 'antd';
import { BugOutlined } from '@ant-design/icons';
export default function ErrorGenPanel() {
if (window.env.PRODUCTION && !options.enableCrash) return null;
return (
<Popover
content={
<div className='flex flex-col gap-3'>
<CrashReactAppButton />
<EventErrorButton />
<MemoryCrushButton />
<PromiseErrorButton />
<EvalErrorBtn />
<InternalErrorButton />
</div>
}
placement={'topRight'}
>
<Button danger type='primary' className='ml-3' icon={<BugOutlined />}></Button>
</Popover>
);
}