Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional Test Review #183

Merged
merged 260 commits into from
Oct 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
742c304
Feat : modify UI and save input data #104
hummingbbird Oct 14, 2023
87ce74f
Feat : create issuechip for showing selected chips #104
hummingbbird Oct 14, 2023
44bbd7b
Feat : install interweave module #104
hummingbbird Oct 15, 2023
94fb32a
Feat : create chip and convert yaml to html using interweave module #104
hummingbbird Oct 15, 2023
05437ba
Feat : add reviewRepoDataState #112
ancy0 Oct 15, 2023
157feb4
Feat : connect recoil #104
hummingbbird Oct 15, 2023
946c77f
Feat : create slider for review item #112
ancy0 Oct 15, 2023
4d5660b
Feat : add info about review first page #112
ancy0 Oct 15, 2023
57699f2
Feat : modify recoil data logic and complete data set for server #104
hummingbbird Oct 15, 2023
cc48ab8
refactor : refactor code following code convention #104
hummingbbird Oct 15, 2023
d4dc80b
Feat : connect step page with recoil #104
hummingbbird Oct 15, 2023
4b84d59
Feat : add second page & data for review #112
ancy0 Oct 15, 2023
3fc8734
Feat : create selectAuto2 for select owner #112
ancy0 Oct 15, 2023
45d0126
Feat : create selectAuto for select repoName #112
ancy0 Oct 15, 2023
e66bf45
Chore : add props #112
ancy0 Oct 15, 2023
470e7c9
Feat : add first page for review #112
ancy0 Oct 15, 2023
d95a134
Add : add git fork icon #112
ancy0 Oct 16, 2023
7963a08
Chore : edit item #112
ancy0 Oct 16, 2023
a17cd8d
Feat : add data
ancy0 Oct 17, 2023
d8862d9
Feat : API
ancy0 Oct 17, 2023
cb4e6e2
Remove : React.StrictMode #112
ancy0 Oct 17, 2023
d27c4c9
Feat : add second info #112
ancy0 Oct 17, 2023
64b5bae
Feat : add review page #112
ancy0 Oct 17, 2023
1336844
Chore : add review page path #112
ancy0 Oct 17, 2023
a2d5115
Chore : edit data #112
ancy0 Oct 17, 2023
bf65770
Chore : add color #112
ancy0 Oct 17, 2023
4e3e6d8
Chore : add loading #112
ancy0 Oct 17, 2023
a015ed3
Chore : modify detailed color #104
hummingbbird Oct 17, 2023
3c4ab13
Merge branch 'main' into feature/104
hummingbbird Oct 17, 2023
ca8b510
Add: Create ReviewLayout.js #131
sinji2102 Oct 17, 2023
1e8c5b6
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 17, 2023
133b024
Chore: Modify button connection #131
sinji2102 Oct 17, 2023
d213475
Feat : complete recoil connection and add preview image #104
hummingbbird Oct 17, 2023
0fd6b71
Chore : add hover effect to template item #112
ancy0 Oct 18, 2023
6a0efe0
Add: Create ReviewLayout.js
sinji2102 Oct 18, 2023
964ef52
Chore : add hover effect to template item #112
ancy0 Oct 18, 2023
6796737
Chore : edit data #112
ancy0 Oct 18, 2023
50930e2
Add : add icon #112
ancy0 Oct 18, 2023
eaaf053
Chore : connect repo link & add icon #112
ancy0 Oct 18, 2023
22025d8
Feat : add a button to end the review and reset #112
ancy0 Oct 18, 2023
3ef68f1
Feat : control repo selection based on owner selection #112
ancy0 Oct 18, 2023
98b175f
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 18, 2023
ba2c9af
Chore : helper text color conversion effect #112
ancy0 Oct 18, 2023
8b6e7f2
Remove : remove unused code #112
ancy0 Oct 18, 2023
d4509c7
Feat : add review result about security&community #112
ancy0 Oct 18, 2023
4e615f4
Chore : test CircularProgress #112
ancy0 Oct 18, 2023
58ff1e1
Feat : add input options(minimum characters and limited marks) #104
hummingbbird Oct 18, 2023
eb6b08c
Chore : change detailed UI #104
hummingbbird Oct 18, 2023
521e84a
Feat : add selectedType recoil item for limitations #104
hummingbbird Oct 18, 2023
750d2df
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 19, 2023
4cda1d7
Bump @babel/traverse from 7.22.8 to 7.23.2
dependabot[bot] Oct 19, 2023
cb6cecb
Merge pull request #138 from AgainIoT/dependabot/npm_and_yarn/babel/t…
ymw0407 Oct 19, 2023
7e1de7b
Feat : modify input limitations and list number limitation #104
hummingbbird Oct 19, 2023
27bea14
Merge branch 'main' into feature/104
hummingbbird Oct 19, 2023
4a513ef
Fix : resolved step mapping problem #104
bentshrimp Oct 19, 2023
286f911
Add : LICENSE.spdx
ymw0407 Oct 20, 2023
b0a15ff
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 20, 2023
0797f09
Feat: Add Cancel Button in ReviewLayout #131
sinji2102 Oct 20, 2023
c9ff228
Chore: Edit Cancel Dialog Design #131
sinji2102 Oct 20, 2023
8947266
Chore: Connect Button #131
sinji2102 Oct 20, 2023
e0a8b90
Chore: Connect Button Error Fix #131
sinji2102 Oct 20, 2023
10a8d83
Chore: Remove unused import 'ReviewStepInfo #131
sinji2102 Oct 20, 2023
938aeff
Chore: Resolve code smell in ReviewLayout #131
sinji2102 Oct 20, 2023
1bda8e8
Chore: Remove activeState in ReviewLayout #131
sinji2102 Oct 20, 2023
18c836c
Fix : modify code for review results null #112
ancy0 Oct 20, 2023
6e06dda
Remove : delete unnecessary code #112
ancy0 Oct 20, 2023
762791c
Chore : modify code according to license data format #112
ancy0 Oct 20, 2023
398245f
Chore : edit ui #112
ancy0 Oct 20, 2023
1a99d61
Chore : inherit Styles #112
ancy0 Oct 20, 2023
5ce84a3
Remove : remove unused code #112
ancy0 Oct 20, 2023
de47a3d
Chore : edit text & ui #112
ancy0 Oct 20, 2023
b7747a8
Remove: Remove test.gif #131
sinji2102 Oct 21, 2023
b18b68e
Refactor: refactor ReviewStepInfo styled-components #131
sinji2102 Oct 21, 2023
52aa860
Chore: Delete Title1 in ReviewStepInfo #131
sinji2102 Oct 21, 2023
4b0e5db
Refactor: refactor ReviewLayout import #131
sinji2102 Oct 21, 2023
04eedba
Feat : modify detailed input restrictions #104
hummingbbird Oct 21, 2023
3a678e5
Feat : modify recoil data format and body state #104
hummingbbird Oct 21, 2023
78b6b96
Merge pull request #141 from AgainIoT/feature/104
hummingbbird Oct 21, 2023
9559bd2
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 21, 2023
08fea93
Fix : TemplateBody overall fix #140
bentshrimp Oct 20, 2023
84803cc
Update : templateModal UI looks more tidy #140
bentshrimp Oct 21, 2023
26ad6c5
Add: Create ReviewDialog.js #131
sinji2102 Oct 21, 2023
09e0333
Chore: ReviewDialog connect ReviewLayout #131
sinji2102 Oct 21, 2023
de70c4c
Feat : added exit button on the right top corner #140
bentshrimp Oct 21, 2023
ad85346
Feat : alert data loss refreshing #139
bentshrimp Oct 20, 2023
004074e
Chore: Delete createRepoData in ReviewDialog #131
sinji2102 Oct 21, 2023
6b496ff
Feat : create ReviewContributingPage #142
hummingbbird Oct 21, 2023
e909df4
Chore: Delete postEmail in ReviewDialog #131
sinji2102 Oct 21, 2023
446d75c
Chore: Delete postRepoData and Create post Review Data #131
sinji2102 Oct 21, 2023
0db29bc
Chore: Delete unused const in ReviewDialog #131
sinji2102 Oct 21, 2023
2df0926
Merge pull request #144 from AgainIoT/feature/131
sinji2102 Oct 21, 2023
704f98e
Chore : Correct translation errors for README.md #147
Kim-Jiyun Oct 21, 2023
df8f2ec
Refactor: Delete unused import in ReviewDialog #145
sinji2102 Oct 21, 2023
e78728f
Chore : Correct translation errors in the description for the pr #147
Kim-Jiyun Oct 21, 2023
f740744
Merge pull request #148 from AgainIoT/feature/147
ancy0 Oct 21, 2023
80c93c5
Fix: ReviewDialog Error #145
sinji2102 Oct 21, 2023
9b279f6
Feat : redirect to step1 when you refresh #139
bentshrimp Oct 21, 2023
20b46a1
Chore : we don't use theme for styled component #140
bentshrimp Oct 21, 2023
e67fa15
Feat : add review info layout in MainPage #143
hummingbbird Oct 21, 2023
fb347ce
Update : removed Search on TemplateList
bentshrimp Oct 22, 2023
a671edb
Feat : add fadein effect in welcome & step1 page #143
hummingbbird Oct 22, 2023
c749510
Feat : add reviewAlertListState #112
ancy0 Oct 22, 2023
99841d2
Feat : add notification list for when review data is null #112
ancy0 Oct 22, 2023
69241c0
feat : add visual effect in every element #143
hummingbbird Oct 22, 2023
bb07412
Chore : modify width expansion #143
hummingbbird Oct 22, 2023
b68fdf7
Chore : modify CreateRepo page layout #143
hummingbbird Oct 22, 2023
1855c50
Chore : change buttonWrapper position and modify SelectAuto width #143
hummingbbird Oct 22, 2023
277157f
Chore : use props instead of sx #140
bentshrimp Oct 22, 2023
8d88bf3
Update : step layout looks much more balanced #143
bentshrimp Oct 22, 2023
bd12eb6
Chore : change img file #143
hummingbbird Oct 22, 2023
45eeee7
Feat : resolve error about resizing #151
hummingbbird Oct 22, 2023
2d277b8
Feat : create contributing and readme template page for review #142
hummingbbird Oct 22, 2023
2da3aba
Update : step1 page is more responsible #143
bentshrimp Oct 22, 2023
3f2df16
Chore : change router page #142
hummingbbird Oct 22, 2023
0aa2786
Merge pull request #150 from AgainIoT/feature/143
hummingbbird Oct 22, 2023
bf93ed6
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 22, 2023
9f4a5cf
Merge pull request #149 from AgainIoT/feature/140
bentshrimp Oct 22, 2023
548d727
Add: Create ReviewPRTemplagePage #145
sinji2102 Oct 22, 2023
feda936
Chore: Add TitleH1 in ReviewStepInfo #145
sinji2102 Oct 22, 2023
a707d1a
Update : on history pop, go back and go forward right away #139
bentshrimp Oct 22, 2023
525fb22
Chore: Connect ReviewPRTemplataPage to ReviewLayout #145
sinji2102 Oct 22, 2023
ee9d8c0
Chore: Finish Review Connect MainPage #145
sinji2102 Oct 22, 2023
d648e1a
Chore: Connect ReviewDialog each step #145
sinji2102 Oct 22, 2023
b00e88d
Merge branch 'main' into feature/139
bentshrimp Oct 22, 2023
db9da37
Fix: Correct errors that remain in state after review #145
sinji2102 Oct 22, 2023
d253d4d
Chore: Remove unused import and const in ReviewPRTemplate #145
sinji2102 Oct 22, 2023
431fe94
Feat : add Chart.js #112
ancy0 Oct 22, 2023
055b57a
Feat : create chart for review #112
ancy0 Oct 22, 2023
4412bd5
Feat : add chart #112
ancy0 Oct 22, 2023
86ed3cc
Chore : edit ui #112
ancy0 Oct 22, 2023
879a41b
Fix : Layout MarkdownPreview size growing problem #139
bentshrimp Oct 22, 2023
c32c2a5
Refactor: Remove unused import in PRTemplatePage #145
sinji2102 Oct 22, 2023
911b00b
Fix: Fix issue request body in ReviewDialog #145
sinji2102 Oct 22, 2023
8d3d3e5
Refactor: Remove unused props in ReviewLayout #145
sinji2102 Oct 22, 2023
3a06218
Refactor: Modify to code convention rules #145
sinji2102 Oct 22, 2023
a170e95
Refactor: Modify to code convention rules #145
sinji2102 Oct 22, 2023
7e88f9a
Refactor: Remove unuesd props in ReviewStepInfo #145
sinji2102 Oct 22, 2023
da3289c
Merge pull request #154 from AgainIoT/feature/145
sinji2102 Oct 22, 2023
20ab6c0
Feat : add review state #112
ancy0 Oct 22, 2023
22994c2
Add: Create ReviewIssueTemplatePage #146
sinji2102 Oct 22, 2023
c7b6892
Chore : test #112
ancy0 Oct 22, 2023
a86623c
Chore: Connect ReviewIssueTemplatePage #146
sinji2102 Oct 22, 2023
7f72b4b
Fix : Issue template page layout size problem #139
bentshrimp Oct 22, 2023
194e002
Merge branch 'main' into feature/112
ancy0 Oct 22, 2023
34ad2f1
Fix: Fix ReviewDialog post error #146
sinji2102 Oct 22, 2023
2857f2c
Refactor: Remove unused import and assignment in ReviewIssueTemplateP…
sinji2102 Oct 22, 2023
091c031
Merge pull request #155 from AgainIoT/feature/146
ancy0 Oct 22, 2023
30713f8
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
sinji2102 Oct 22, 2023
d399628
Chore: Add setActiveState ReviewContributingPage #142
sinji2102 Oct 22, 2023
f9b504c
Rename: Rename ReviewContributingPage to ReviewContributingTemplatePa…
sinji2102 Oct 22, 2023
a27d91c
Merge pull request #152 from AgainIoT/feature/151
ancy0 Oct 22, 2023
51baa77
Chore: Connect ReviewContributingTemplatePage #142
sinji2102 Oct 22, 2023
4c4a9d0
Add: Create ReviewReadmeTemplatePage #142
sinji2102 Oct 22, 2023
cce0560
Delete: Delete ReviewReadmePage #142
sinji2102 Oct 22, 2023
2dfcdb1
Feat : check review data value for chart #112
ancy0 Oct 22, 2023
c284291
Chore: Connect ReviewReadmeTemplatePage #142
sinji2102 Oct 22, 2023
7a0e016
Refactor : remove unused code #112
ancy0 Oct 22, 2023
2f11c2c
Chore : create chart using review data list #112
ancy0 Oct 22, 2023
53f9421
Refactor: Remove unused assignments and import in ReviewReadmeTemplat…
sinji2102 Oct 22, 2023
f89f322
Merge pull request #156 from AgainIoT/feature/142
ancy0 Oct 22, 2023
e0c3059
Refactor : according to code convention #112
ancy0 Oct 22, 2023
966aba8
Chore : edit text #112
ancy0 Oct 22, 2023
ff21ed9
Chore : edit color #112
ancy0 Oct 22, 2023
8386a02
Chore : add arrowIcon #112
ancy0 Oct 22, 2023
cb383e2
Chore : add color #112
ancy0 Oct 22, 2023
0d5d59d
Chore : edit #112
ancy0 Oct 22, 2023
55b586f
Merge branch 'main' into feature/112
ancy0 Oct 22, 2023
13ed786
Refactor : remove unused code #112
ancy0 Oct 22, 2023
dcf86bc
Merge branch 'feature/112' of https://github.com/AgainIoT/Open-Set-Go…
ancy0 Oct 22, 2023
6ede05f
Chore : var -> const #112
ancy0 Oct 22, 2023
2a52a2c
Chore : use styled components #112
ancy0 Oct 22, 2023
48265dc
Refactor : remove unused code #112
ancy0 Oct 22, 2023
79db5c3
Feat : using react-persist to not problem with f5 & prevent error res…
ymw0407 Oct 22, 2023
51708ab
Refactor : remove unused code #112
ancy0 Oct 22, 2023
3eeb2be
Refactor : according to code convention #112
ancy0 Oct 22, 2023
6fe369f
Refactor : remove unused code #112
ancy0 Oct 22, 2023
af52997
Merge pull request #158 from AgainIoT/feature/112
ancy0 Oct 22, 2023
4dc1b95
Chore : delete unnecessary code #157
ancy0 Oct 22, 2023
2d102db
Chore : add path #157
ancy0 Oct 22, 2023
7a927ca
Chore : add onClick event #157
ancy0 Oct 22, 2023
3684ee6
Chore : edit owner&repoName state #157
ancy0 Oct 22, 2023
759eb9d
Fix : generate api improved & isLogined check added in step & repoNam…
ymw0407 Oct 22, 2023
cd2a9c3
Fix : check duplication removed
ymw0407 Oct 23, 2023
616c844
Fix : add dataState #161
ancy0 Oct 23, 2023
73dcdff
Merge pull request #153 from AgainIoT/feature/139
ymw0407 Oct 23, 2023
779a26d
Merge pull request #162 from AgainIoT/feature/161
ymw0407 Oct 23, 2023
b4f6afb
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
ancy0 Oct 23, 2023
ba47de7
Chore: Change Welcome.js buttons font size
felixx78 Oct 23, 2023
238487e
Merge pull request #163 from v1st78/v1st78
ymw0407 Oct 23, 2023
93b0dd6
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
ancy0 Oct 23, 2023
444ffe8
Feat : Initialize selected value when going back to page #157
ancy0 Oct 23, 2023
a6def82
Chore : navigate main->review #157
ancy0 Oct 23, 2023
f085a89
Chore : navigate main->review #157
ancy0 Oct 23, 2023
42c7a82
chore : add navigate option #157
ancy0 Oct 23, 2023
5fbbf76
Update : Modify overall layout of Review #160
hummingbbird Oct 23, 2023
db73a64
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
hummingbbird Oct 23, 2023
5d76817
chore : add navigate option #157
ancy0 Oct 23, 2023
e6df765
Chore : modify inputLabel attribute #160
hummingbbird Oct 23, 2023
943faeb
Feat : Checking is valid route & token, if not navigate to main #157
ymw0407 Oct 23, 2023
3a3f978
Feat : Checking isValid token, if not navigate to main at review's is…
ymw0407 Oct 23, 2023
6b3f524
Fix : overall stability improved with checkTokenValid #157
ymw0407 Oct 23, 2023
997d7fb
Fix : logout button fix #135
bentshrimp Oct 23, 2023
7cc50d0
Chore : comment unstable feature for demonstration #135
bentshrimp Oct 23, 2023
f8f2c35
Chore : docs font size change #135
bentshrimp Oct 23, 2023
f227100
Merge branch 'main' into feature/135
bentshrimp Oct 23, 2023
fa00bde
Feat : create icon slider #160
hummingbbird Oct 23, 2023
4b58a00
Chore : change slider speed slower #160
hummingbbird Oct 23, 2023
a469a45
Update : change logo from text to image #135
bentshrimp Oct 23, 2023
a7d42c7
Update : block logout on step pages #135
bentshrimp Oct 23, 2023
9ca6496
Feat : add button state change fuction #160
hummingbbird Oct 23, 2023
07b2fc9
Feat: Modify the color of the select button #159
Kim-Jiyun Oct 23, 2023
c6c4354
Chore : reset state #157
ancy0 Oct 23, 2023
2087b45
Chore : remove unused import #160
hummingbbird Oct 23, 2023
3640bb5
Merge branch 'main' of https://github.com/AgainIoT/Open-Set-Go_client…
Kim-Jiyun Oct 23, 2023
dbf0190
Feat: Apply select button border #159
Kim-Jiyun Oct 23, 2023
3e9288e
Merge pull request #168 from AgainIoT/feature/160
hummingbbird Oct 23, 2023
1b4e523
Fix : added logout defaultProps #135
bentshrimp Oct 23, 2023
a943ac5
Feat : when log-out, navigate to main page #135
ymw0407 Oct 23, 2023
176bf10
Merge pull request #167 from AgainIoT/feature/135
ymw0407 Oct 23, 2023
9b08780
Merge pull request #165 from AgainIoT/feature/157
ymw0407 Oct 23, 2023
b966fd8
Feat: Modify icon of community item #170
Kim-Jiyun Oct 23, 2023
f68efcb
Feat: Modify icons for template items #170
Kim-Jiyun Oct 23, 2023
3454213
Feat: Modifying icons for security items #170
Kim-Jiyun Oct 23, 2023
81c1d6c
Chore: Delete example code #170
Kim-Jiyun Oct 23, 2023
e97b2b3
Merge pull request #169 from AgainIoT/feature/159
Kim-Jiyun Oct 24, 2023
a390e05
Feat: Modify to the icon that fits the secretScan #170
Kim-Jiyun Oct 24, 2023
3ae8c54
Feat: Modify prIcon resize #170
Kim-Jiyun Oct 24, 2023
27e7bcb
Fear: Resize IconBox #170
Kim-Jiyun Oct 24, 2023
227de8d
Fix: Fix it so that it comes out properly #170
Kim-Jiyun Oct 24, 2023
18364f6
Update : edited meta description #51
bentshrimp Oct 25, 2023
5dd2d4c
Feat : added open graph tag #51
bentshrimp Oct 25, 2023
6154533
Refactor: Delete unnecessary code #170
Kim-Jiyun Oct 25, 2023
02f5ee2
Merge pull request #171 from AgainIoT/feature/170
ancy0 Oct 25, 2023
3472526
Feat : add sitemap #51
bentshrimp Oct 25, 2023
5bbd251
Fix : save and delete user data using recoil persist #139
bentshrimp Oct 25, 2023
a8bb51b
Fix : authorization data is not deleted on finish dialog #139
bentshrimp Oct 25, 2023
8c472de
Chore : resolved code smell #139
bentshrimp Oct 25, 2023
04d4915
Fix : missing Head tag added & sitemap refreshed & robots.txt fixed a…
ymw0407 Oct 25, 2023
0007e21
Merge pull request #174 from AgainIoT/feature/51
ymw0407 Oct 25, 2023
f41bed3
Merge pull request #173 from AgainIoT/feature/139
ymw0407 Oct 25, 2023
f45cf8d
Fix : validate new repository name on owner and repoName change #175
bentshrimp Oct 25, 2023
9300396
Chore : change code following the lint #175
bentshrimp Oct 27, 2023
5e51229
Update : send different repoData acorrding to layout type #176
bentshrimp Oct 28, 2023
181069e
Fix : on selected Owner change, select repoName is initialized #175
bentshrimp Oct 28, 2023
1c2c6f4
Chore : removed duplicates #175
bentshrimp Oct 28, 2023
3ac7cf6
Fix : complete button is activated only for the first click #178
bentshrimp Oct 28, 2023
321946b
Merge pull request #179 from AgainIoT/feature/175
ymw0407 Oct 28, 2023
1f18423
Merge pull request #181 from AgainIoT/feature/178
ymw0407 Oct 28, 2023
692a196
Fix : fetch reviewed repository's description and license #176
bentshrimp Oct 28, 2023
8fced1f
Merge pull request #180 from AgainIoT/feature/176
ymw0407 Oct 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix : save and delete user data using recoil persist #139
Signed-off-by: bentshrimp <bent_shrimp@kookmin.ac.kr>
bentshrimp committed Oct 25, 2023

Verified

This commit was signed with the committer’s verified signature.
paul Paul Sadauskas
commit 5bbd251181eb8998aae2e7a5f8d77f71a897ca95
39 changes: 15 additions & 24 deletions src/layout/Header.js
Original file line number Diff line number Diff line change
@@ -61,22 +61,18 @@ export const Header = (props) => {
const [anchorElNav, setAnchorElNav] = useState(null);
const [anchorElUser, setAnchorElUser] = useState(null);
const [src, setSrc] = useRecoilState(avatar);
const [userId, setUserId] = useRecoilState(id);
const setUserId = useSetRecoilState(id);
const [userName, setUserName] = useRecoilState(name);
const [loggedIn, setLoggedIn] = useRecoilState(isLogin);

const navigate = useNavigate();

const checkIsLogin = async () => {
const loggedIn = await checkTokenValid();
if (loggedIn) {
setSrc(localStorage.avatar);
setUserId(localStorage.id);
setUserName(localStorage.name);
} else {
localStorage.removeItem("id");
localStorage.removeItem("name");
localStorage.removeItem("avatar");
if (!loggedIn) {
setUserId(null);
setUserName(null);
setSrc(null);
}
setLoggedIn(loggedIn);
};
@@ -110,13 +106,12 @@ export const Header = (props) => {
"",
{ withCredentials: true },
);
// delete user login data
setUserId(null);
setUserName(null);
setSrc(null);
setLoggedIn(false);
localStorage.setItem("id", "guest");
localStorage.setItem("name", "guest");
localStorage.setItem("avatar", "");
setUserId(localStorage.getItem("id"));
setUserName(localStorage.getItem("name"));
setSrc(localStorage.getItem("avatar"));

handleCloseUserMenu();
navigate("/");
};
@@ -242,17 +237,13 @@ export const Header = (props) => {
}
sx={{ p: 0 }}
>
<Avatar alt={userName ? userName : userId} src={src} />
{loggedIn ? (
<Avatar alt={userName} src={src} />
) : (
<Avatar alt={"guest"} src={null} />
)}
</IconButton>
</Tooltip>
{/* <Typography
variant="p"
component="div"
color={COLOR.MAIN_BLACK}
textAlign="center"
>
{userId}
</Typography> */}
</AvatarDiv>
<Menu
sx={{ mt: "45px" }}
3 changes: 0 additions & 3 deletions src/pages/Login.js
Original file line number Diff line number Diff line change
@@ -27,9 +27,6 @@ function LoginPage() {
setId(id);
setName(name);
setAvatar(avatar);
localStorage.setItem("id", id);
localStorage.setItem("name", name);
localStorage.setItem("avatar", avatar);
}
};