Getting error when i am enable to recognitionEnable={true}
Closed this issue · 0 comments
When i am trying enable to recognitionEnable to my chat bot but there is error like :
ERROR in ./example/components/Example.jsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: C:\Users\Pulivarthi\RASA\ReactBot\example\components\Example.jsx: true is a reserved word (16:22)
14 | userFontColor: '#4a4a4a'
15 | };
16 | recognitionEnable = {true}
| ^
How to solve it please help me
This is my code
import React from 'react';
import { ThemeProvider } from 'styled-components';
import ChatBot from '../../lib/index';
const otherFontTheme = {
background: '#f5f8fb',
fontFamily: 'Helvetica Neue',
headerBgColor: '#6e48aa',
headerFontColor: '#fff',
headerFontSize: '16px',
botBubbleColor: '#6E48AA',
botFontColor: '#fff',
userBubbleColor: '#fff',
userFontColor: '#4a4a4a'
};
recognitionEnable={true}
const steps = [
{
id: '1',
message: 'Please type a number',
trigger: '2',
},
{
id: '2',
user: true,
validator: (value) => {
if (isNaN(value)) {
return 'value should be a number';
}
return true;
},
trigger: '1',
},
];
const ThemedExample = () => (
<React.StrictMode>
</React.StrictMode>
);
export default ThemedExample;