Fix react context bug.

Job ID: 34411552

Budget: £10 – £20 GBP

I've an existing react website that displays live graphs. (source attached and here: https://www.timestored.com/a/client.zip).
There's a bug where the context is not being picked up so the light/dark theme is not being configured properly.

The context.theme passed into echarts is empty {}.
It should be either light/dark depending on what is selected.

I have tried using !context and tried passing it as a prop neither work.
I think it's because it's created by a factory.

The relevant snippets of code are in ChartFactory.tsx:
console.log(this.context.theme); // this will give undefined.
return <ReactECharts option={options} theme={this.context.theme} />;

Success:
- The context.theme within charts contains dark/light
- AND it gets updated when user toggles light/dark mode.
Related categories: React.js Typescript