chore: remove unused logs

This commit is contained in:
zerosoul
2022-05-25 14:12:10 +08:00
parent b67bf93ce0
commit a787941983
12 changed files with 26 additions and 28 deletions
+3 -3
View File
@@ -9,7 +9,7 @@
"@metamask/onboarding": "^1.0.1",
"@microsoft/fetch-event-source": "^2.0.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
"@reduxjs/toolkit": "^1.8.1",
"@reduxjs/toolkit": "^1.8.2",
"@svgr/webpack": "^6.2.1",
"@tippyjs/react": "^4.2.6",
"@toast-ui/editor": "^3.1.7",
@@ -119,7 +119,7 @@
]
},
"devDependencies": {
"@commitlint/cli": "^17.0.0",
"@commitlint/cli": "^17.0.1",
"@commitlint/config-conventional": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
@@ -128,7 +128,7 @@
"eslint-plugin-react-hooks": "^4.5.0",
"gh-pages": "^4.0.0",
"husky": "^8.0.1",
"lint-staged": "^12.4.1",
"lint-staged": "^12.4.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.6.2"
+2 -2
View File
@@ -33,7 +33,7 @@ listenerMiddleware.startListening({
predicate: (action) => {
const { type = "" } = action;
const [prefix] = type.split("/");
console.log("operation", type, operations.includes(prefix));
// console.log("operation", type, operations.includes(prefix));
return operations.includes(prefix);
// console.log("listener predicate", action, currentState, previousState);
// return true;
@@ -41,7 +41,7 @@ listenerMiddleware.startListening({
effect: async (action, listenerApi) => {
const { type = "", payload } = action;
const [prefix, operation] = type.split("/");
console.log("effect opt", action);
// console.log("effect opt", action);
if (!window.CACHE && prefix !== "__rtkq") return;
const state = listenerApi.getState()[prefix];
+2 -4
View File
@@ -6,12 +6,10 @@ export default function Avatar({
type = "user",
...rest
}) {
console.log("avatar url", url);
// console.log("avatar url", url);
const [src, setSrc] = useState("");
const handleError = (err) => {
if (url) {
console.log("load avatar error", url, err);
}
console.log("load avatar error", err);
const tmp = getInitialsAvatar({
initials: getInitials(name),
background: type == "channel" ? "#EAECF0" : undefined,
+1 -1
View File
@@ -108,7 +108,7 @@ export default function Server() {
const handleCloseModal = () => {
setChannelModalVisible(false);
};
console.log("server info", server);
// console.log("server info", server);
const { name, description, logo } = server;
return (
<StyledWrapper>
+1 -1
View File
@@ -240,7 +240,7 @@ export const normalizeArchiveData = (
user.avatar = avatarUrl;
console.log("user data", transformedContent, user);
// console.log("user data", transformedContent, user);
return {
source,
from_mid: mid,
+1 -1
View File
@@ -80,7 +80,7 @@ const NavItem = ({ uid, mid, unreads, setFiles }) => {
}
};
if (!currUser) return null;
console.log("preview msg", previewMsg, normalizedMessages);
// console.log("preview msg", previewMsg, normalizedMessages);
return (
<Tippy
interactive
+1 -1
View File
@@ -32,7 +32,7 @@ export default function DMList({ uids, setDropFiles }) {
return { lastMid, unreads, uid };
});
console.log("temp uids", sessions);
// console.log("temp uids", sessions);
return sessions
.sort((s1, s2) => {
if (!s1.lastMid) return s2.lastMid - Infinity;
+1 -1
View File
@@ -43,7 +43,7 @@ export default function ChatPage() {
};
const tmpUid =
sessionUids.findIndex((i) => i == user_id) > -1 ? null : user_id;
console.log("temp uid", tmpUid);
// console.log("temp uid", tmpUid);
const placeholderVisible = !channel_id && !user_id;
return (
<>
+2 -2
View File
@@ -26,7 +26,7 @@ export function getUnreadCount({
loginUid = 0,
readIndex = 0,
}) {
console.log({ mids, loginUid, readIndex });
// console.log({ mids, loginUid, readIndex });
// 先过滤掉空信息和from自己的
const others = mids.filter((mid) => {
const { from_uid = 0 } = messageData[mid] || {};
@@ -49,7 +49,7 @@ export function getUnreadCount({
}
});
});
console.log("unreads", final.length, tmps);
// console.log("unreads", final.length, tmps);
return { unreads: final.length, mentions: tmps };
}
export const renderPreviewMessage = (message = null) => {
+1 -1
View File
@@ -24,7 +24,7 @@ export default function GoogleLoginButton({ login, clientId }) {
const handleGoogleLogin = () => {
signIn();
};
console.log("google login ", loaded);
// console.log("google login ", loaded);
return (
<StyledSocialButton disabled={!loaded} onClick={handleGoogleLogin}>
<img className="icon" src={googleSvg} alt="google icon" />
+1 -1
View File
@@ -102,7 +102,7 @@ export default function LoginPage() {
const handleInput = (evt) => {
const { type } = evt.target.dataset;
const { value } = evt.target;
console.log(type, value);
// console.log(type, value);
setInput((prev) => {
prev[type] = value;
return { ...prev };
+10 -10
View File
@@ -1037,9 +1037,9 @@
"@babel/helper-validator-identifier" "^7.16.7"
to-fast-properties "^2.0.0"
"@commitlint/cli@^17.0.0":
"@commitlint/cli@^17.0.1":
version "17.0.0"
resolved "http://mirrors.cloud.tencent.com/npm/@commitlint%2fcli/-/cli-17.0.0.tgz#6c86c6b0eba4ba1204a19833c3c962b623f35518"
resolved "https://mirrors.cloud.tencent.com/npm/@commitlint%2fcli/-/cli-17.0.0.tgz#6c86c6b0eba4ba1204a19833c3c962b623f35518"
integrity sha512-Np6slCdVVG1XwMvwbZrXIzS1INPAD5QmN4L6al04AmCd4nAPU63gxgxC5Mz0Fmx7va23Uvb0S7yEFV1JPhvPUQ==
dependencies:
"@commitlint/format" "^17.0.0"
@@ -1829,10 +1829,10 @@
resolved "http://mirrors.cloud.tencent.com/npm/@react-hook%2fmerged-ref/-/merged-ref-1.3.2.tgz#919b387a5f79ed67f2578f2015ab7b7d337787d2"
integrity sha512-cQ9Y8m4zlrw/qotReo33E+3Sy9FVqMZb5JwUlb3wj3IJJ1cNJtxcgfWF6rS2NZQrfBJ2nAnckUdPJjMyIJTNZg==
"@reduxjs/toolkit@^1.8.1":
version "1.8.1"
resolved "http://mirrors.cloud.tencent.com/npm/@reduxjs%2ftoolkit/-/toolkit-1.8.1.tgz#94ee1981b8cf9227cda40163a04704a9544c9a9f"
integrity sha512-Q6mzbTpO9nOYRnkwpDlFOAbQnd3g7zj7CtHAZWz5SzE5lcV97Tf8f3SzOO8BoPOMYBFgfZaqTUZqgGu+a0+Fng==
"@reduxjs/toolkit@^1.8.2":
version "1.8.2"
resolved "https://mirrors.cloud.tencent.com/npm/@reduxjs%2ftoolkit/-/toolkit-1.8.2.tgz#352fd17bc858af51d21ce8d28183a930cab9e638"
integrity sha512-CtPw5TkN1pHRigMFCOS/0qg3b/yfPV5qGCsltVnIz7bx4PKTJlGHYfIxm97qskLknMzuGfjExaYdXJ77QTL0vg==
dependencies:
immer "^9.0.7"
redux "^4.1.2"
@@ -6089,10 +6089,10 @@ linkifyjs@^3.0.5:
resolved "http://mirrors.cloud.tencent.com/npm/linkifyjs/-/linkifyjs-3.0.5.tgz#99e51a3a0c0e232fcb63ebb89eea3ff923378f34"
integrity sha512-1Y9XQH65eQKA9p2xtk+zxvnTeQBG7rdAXSkUG97DmuI/Xhji9uaUzaWxRj6rf9YC0v8KKHkxav7tnLX82Sz5Fg==
lint-staged@^12.4.1:
version "12.4.1"
resolved "http://mirrors.cloud.tencent.com/npm/lint-staged/-/lint-staged-12.4.1.tgz#63fa27bfc8a33515f6902f63f6670864f1fb233c"
integrity sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==
lint-staged@^12.4.2:
version "12.4.2"
resolved "https://mirrors.cloud.tencent.com/npm/lint-staged/-/lint-staged-12.4.2.tgz#380a5ec5a7a23caa9420972b0f98c8192afddecd"
integrity sha512-JAJGIzY/OioIUtrRePr8go6qUxij//mL+RGGoFKU3VWQRtIHgWoHizSqH0QVn2OwrbXS9Q6CICQjfj+E5qvrXg==
dependencies:
cli-truncate "^3.1.0"
colorette "^2.0.16"