diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2025-10-26 13:51:31 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-26 12:51:31 +0300 |
| commit | 6a631744d9c80ff9a1a9f4b278bc0337ecdb494e (patch) | |
| tree | 3acf1f505751d997b1b7482823eacabcb79a03f3 /frontend/src/App.tsx | |
| parent | fix/frontend: tablet view logout button (#286) (diff) | |
| download | lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.tar.gz lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.tar.bz2 lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.zip | |
chore/frontend: semicolon linting (#287)
Diffstat (limited to 'frontend/src/App.tsx')
| -rw-r--r-- | frontend/src/App.tsx | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index e7f225c..6ed103e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx | |||
| @@ -52,8 +52,8 @@ const App: React.FC = () => { | |||
| 52 | setIsModerator(false); | 52 | setIsModerator(false); |
| 53 | } else { | 53 | } else { |
| 54 | setProfile({} as UserProfile); // placeholder before we call actual user profile | 54 | setProfile({} as UserProfile); // placeholder before we call actual user profile |
| 55 | _set_profile(get_user_id_from_token(token)) | 55 | _set_profile(get_user_id_from_token(token)); |
| 56 | const modStatus = get_user_mod_from_token(token) | 56 | const modStatus = get_user_mod_from_token(token); |
| 57 | if (modStatus) { | 57 | if (modStatus) { |
| 58 | setIsModerator(true); | 58 | setIsModerator(true); |
| 59 | } else { | 59 | } else { |
| @@ -65,6 +65,46 @@ const App: React.FC = () => { | |||
| 65 | React.useEffect(() => { | 65 | React.useEffect(() => { |
| 66 | _fetch_token(); | 66 | _fetch_token(); |
| 67 | _fetch_games(); | 67 | _fetch_games(); |
| 68 | if (import.meta.env.DEV) { | ||
| 69 | setProfile({ | ||
| 70 | profile: true, | ||
| 71 | steam_id: "76561234567890123", | ||
| 72 | user_name: "test", | ||
| 73 | avatar_link: "", | ||
| 74 | country_code: "XD", | ||
| 75 | titles: [], | ||
| 76 | links: { | ||
| 77 | "p2sr": "", | ||
| 78 | "steam": "", | ||
| 79 | "twitch": "", | ||
| 80 | "youtube": "", | ||
| 81 | }, | ||
| 82 | rankings: { | ||
| 83 | "cooperative": { | ||
| 84 | "completion_count": 0, | ||
| 85 | "completion_total": 0, | ||
| 86 | "rank": 0, | ||
| 87 | }, | ||
| 88 | "singleplayer": { | ||
| 89 | "completion_count": 0, | ||
| 90 | "completion_total": 0, | ||
| 91 | "rank": 0, | ||
| 92 | }, | ||
| 93 | "overall": { | ||
| 94 | "completion_count": 0, | ||
| 95 | "completion_total": 0, | ||
| 96 | "rank": 0, | ||
| 97 | }, | ||
| 98 | }, | ||
| 99 | records: [], | ||
| 100 | pagination: { | ||
| 101 | "current_page": 0, | ||
| 102 | "page_size": 0, | ||
| 103 | "total_pages": 0, | ||
| 104 | "total_records": 0, | ||
| 105 | }, | ||
| 106 | } as UserProfile); | ||
| 107 | }; | ||
| 68 | }, []); | 108 | }, []); |
| 69 | 109 | ||
| 70 | return ( | 110 | return ( |