Skip to content

Commit

Permalink
Change some console logs to info
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Jul 24, 2023
1 parent f9b0440 commit 1c4e35b
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/AddressForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default function AddressForm(props: {
}
}

console.log(values);
console.info(values);
props.onSubmit(values);
})();
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function Navbar() {

function onClickMobileNavLink() {
const el = document.getElementById("header-hamburger") as HTMLInputElement;
console.log(el.value);

el.checked = false;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ChainEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function ChainEdit() {
uid: chainUID,
};

console.log("updating chain information", newChainData);
console.info("updating chain information", newChainData);
try {
await chainUpdate(newChainData);
setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ChainMemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ export default function ChainMemberList() {
}
}

console.log("Please redirect to /users/login", authUser);
if (authUser === null) {
console.info("Please redirect to /users/login", authUser);
return <Redirect to="/users/login" />;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Contacts = () => {
function onSubmit(e: FormEvent<HTMLFormElement>) {
e.preventDefault();
setError("");
console.log(`sending mail: ${values.email}`);
console.info("sending mail: ", values.email);

(async () => {
try {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default function EventDetails() {
function handleUploadImage(e: MouseEvent<HTMLInputElement>) {
e.preventDefault();

console.log("uploading image");
//@ts-ignore
let file = (e.target.files as FileList)[0];
if (!file || !event) return;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Login() {
setActive(false);
}, 1000 * 60 * 2 /* 2 min */);
} catch (err: any) {
console.log("Unable to send login email", err);
console.info("Unable to send login email", err);
setActive(false);
setLoading(false);
setError("email");
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/NewChainLocation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const NewChainLocation = ({ location }: { location: any }) => {
addToastError(GinParseErrors(t, err), err?.status);
}
} else {
console.log(`creating user: ${JSON.stringify(user)}`);
console.info("creating user: ", user);
try {
await registerChainAdmin(
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/NewChainSignup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Signup() {
latitude: values.latitude || 0,
longitude: values.longitude || 0,
};
console.log("submit", registerUser);
console.info("submit", registerUser);

if (registerUser) {
history.push({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/UserEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function UserEdit() {
userUpdateBody.longitude = values.longitude;
}
if (chainUID) userUpdateBody.chain_uid = chainUID;
console.log(userUpdateBody);
console.info(userUpdateBody);

await userUpdate(userUpdateBody);
setTimeout(() => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/providers/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function AuthProvider({ children }: PropsWithChildren<{}>) {
}
function authUserRefresh() {
setLoading(true);
console.log("trying to login");
console.info("trying to login");
return (async () => {
let oldUserUID = getOldStorageUserUID();
if (oldUserUID) {
Expand All @@ -99,7 +99,7 @@ export function AuthProvider({ children }: PropsWithChildren<{}>) {
await authLogout().catch((err) => {
console.error("force logout failed:", err);
});
console.log("force logout");
console.info("force logout");
return UserRefreshState.ForceLoggedOut;
}
console.log("logged in");
Expand Down

0 comments on commit 1c4e35b

Please sign in to comment.