Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Gracefully handle invalid username #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/containers/profile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ProfilePage() {
const req = await getUserReport(username);

if (req.error_code == 1) {
setError(`0xb00${req.error_code}`);
setError('Invalid Username');
} else {
let _data = req.data;
setReport({
Expand Down Expand Up @@ -128,7 +128,7 @@ export default function ProfilePage() {
{error != null && (
<div className="error__wrapper">
<div className="error__content">
<p>Something went wrong.</p>({error})
<h3>{error}</h3>
<a
rel="noopener"
target="_blank"
Expand Down