Skip to content

Commit

Permalink
json normalisation and added url
Browse files Browse the repository at this point in the history
  • Loading branch information
Youllou committed May 23, 2024
1 parent f3a6124 commit 7dffb9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Pages/JsonPage/Json.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@

.loader-container{
display: none;
}

pre{
text-align: left;
}
5 changes: 3 additions & 2 deletions src/Pages/JsonPage/Json.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ function JsonPage(){
const [fetchError, setError]=useState<Error|null>(null)
const location = useLocation();
const file:File = location.state.data[0];

console.log(file)

const api_url = ""
const api_url = "http://localhost:5000"
useEffect(()=>{
const formData = new FormData()
formData.append("file",file)
Expand Down Expand Up @@ -49,7 +50,7 @@ function JsonPage(){
Your file is being analyzed
</p>
</div>
<pre>{(fetchError ? <p>{fetchError.message}</p> : JSON.stringify(form, null, 2) )}</pre>
<pre>{(fetchError ? <p>{fetchError.message}</p> : JSON.stringify(form, null, 2))}</pre>
</div>
);
}
Expand Down

0 comments on commit 7dffb9b

Please sign in to comment.