-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathtour-end-dialog.tsx
71 lines (66 loc) · 2.59 KB
/
tour-end-dialog.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { observer } from 'mobx-react-lite';
import Dialog from '@/components/shared_ui/dialog';
import Text from '@/components/shared_ui/text';
import { useStore } from '@/hooks/useStore';
import { Localize, localize } from '@/utils/tmp/dummy';
const TourEndDialog = observer(() => {
const { ui } = useStore();
const { dashboard } = useStore();
const { is_tour_dialog_visible, setTourDialogVisibility } = dashboard;
const { is_mobile } = ui;
const getTourContent = () => {
return (
<>
<div className='dc-dialog__content__description__text' data-testid='tour-success-message'>
<Localize
key={0}
i18n_default_text={'You have successfully created your bot using a simple strategy.'}
/>
</div>
<div className='dc-dialog__content__description__text'>
<Localize
key={0}
i18n_default_text={'Now, <0>run the bot</0> to test out the strategy.'}
components={[<strong key={0} />]}
/>
</div>
<div className='dc-dialog__content__description__text'>
<Localize
key={0}
i18n_default_text={
'Note: If you wish to learn more about the Bot Builder, you can proceed to the <0>Tutorials</0> tab.'
}
components={[<strong key={0} />]}
/>
</div>
</>
);
};
const onHandleConfirm = () => {
setTourDialogVisibility(false);
};
return (
<div>
<Dialog
is_visible={is_tour_dialog_visible}
confirm_button_text={localize('OK')}
onConfirm={onHandleConfirm}
is_mobile_full_width
className='dc-dialog tour-dialog'
has_close_icon={false}
>
<div className='dc-dialog__content__header'>
<Text weight='bold' color='prominent' size={is_mobile ? 'xs' : 's'}>
{localize('Congratulations')}
</Text>
</div>
<div className='dc-dialog__content__description'>
<Text size={is_mobile ? 'xxs' : 'xs'} color='prominent'>
{getTourContent()}
</Text>
</div>
</Dialog>
</div>
);
});
export default TourEndDialog;