Last active
March 11, 2021 11:18
-
-
Save SingAvi/7b783b18d8dbe343b42a4c5c2643a9fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useContext } from 'react' | |
import '../css/app/App.css'; | |
import EditorProvider from '../contexts/summary_Context.js'; | |
import AiContentProvider from '../contexts/ai_content'; | |
import TextEditor from './text_editor_component.js'; | |
import ResultSection from './result_Section.js'; | |
function AIContentWriter(props) { | |
const [searchQuery, setsearchQuery] = useState(props.location && props.location.query); | |
const [generatedOutputs, setgeneratedOutputs] = useState(props.location && props.location.generatedOutputs); | |
const [response, setResponse] = useState(); | |
return ( | |
<div className="App"> | |
<div className="app_body"> | |
<AiContentProvider content={searchQuery}> | |
<EditorProvider query={searchQuery} generatedText={generatedOutputs}> | |
<div className="row modify-row"> | |
<div className="col-sm-6"> | |
<TextEditor /> | |
</div> | |
<div className="col-sm-6"> | |
<ResultSection /> | |
</div> | |
</div> | |
</EditorProvider> | |
</AiContentProvider> | |
</div> | |
</div> | |
); | |
} | |
export default AIContentWriter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment