Toggle navigation
Toggle navigation
This project
Loading...
Sign in
한우준
/
Straight-Up
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
MrMirror21
2020-12-10 14:20:19 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9741171d19fd51bf37b2f3b784be9fab06a12f18
9741171d
1 parent
55cad445
fix not resetting bug
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
straight-up/.eslintcache
straight-up/src/Main.js
straight-up/src/components/Header.js
straight-up/.eslintcache
View file @
9741171
This diff is collapsed. Click to expand it.
straight-up/src/Main.js
View file @
9741171
...
...
@@ -10,8 +10,6 @@ require('dotenv').config();
const
axios
=
require
(
'axios'
);
const
API_KEY
=
process
.
env
.
REACT_APP_APIKEY
;
console
.
log
(
API_KEY
);
let
imageFormData
=
new
FormData
();
export
default
function
Main
()
{
const
[
imgBase64
,
setImgBase64
]
=
useState
(
""
);
...
...
@@ -33,6 +31,7 @@ export default function Main() {
}
const
analysisImage
=
()
=>
{
let
imageFormData
=
new
FormData
();
imageFormData
.
append
(
'file'
,
img
);
axios
({
method
:
'post'
,
...
...
straight-up/src/components/Header.js
View file @
9741171
import
React
from
'react'
import
{
Link
}
from
'react-router-dom'
;
import
{
useSetRecoilState
}
from
'recoil'
;
import
logo
from
'../style/Logo.JPG'
;
import
{
selectedPosState
,
analysisResultState
}
from
'../store/Global'
;
const
Header
=
()
=>
{
const
setPosition
=
useSetRecoilState
(
selectedPosState
);
const
setResult
=
useSetRecoilState
(
analysisResultState
);
const
reset
=
()
=>
{
setPosition
(
'front'
);
setResult
(
'loading'
);
}
return
(
<
div
className
=
"HeaderContainer"
style
=
{{
...
...
@@ -17,7 +25,7 @@ const Header = () => {
src
=
{
logo
}
width
=
'100px'
height
=
'100px'
alt
=
"Logo"
><
/img>
alt
=
"Logo"
onClick
=
{
reset
}
><
/img>
<
/Link>
<
/div>
...
...
Please
register
or
login
to post a comment