Skip to content

Commit

Permalink
refactor: remove console prints
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuki2003 committed Nov 1, 2023
1 parent 1691e45 commit a87d5bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
8 changes: 2 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ export default function App() {

React.useEffect(() => {
// ensure FCM works
messaging()
.getToken()
.then((token) => {
console.log(token);
});
messaging().getToken();
}, []);

React.useEffect(() => {
Expand All @@ -78,7 +74,7 @@ export default function App() {
}, []);

// ensure push keys are generated
console.log(usePushKeys());
usePushKeys();

return (
<ThemeProvider value={theme}>
Expand Down
5 changes: 1 addition & 4 deletions src/components/web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const Web: React.ForwardRefRenderFunction<WebView, Props> = (
const [DLTarget, setDLTarget] = React.useState<string | null>(null);

const handleBack = React.useCallback(() => {
console.log("handleBack");
try {
const c = innerRef.current;
if (c) {
Expand All @@ -128,19 +127,17 @@ const Web: React.ForwardRefRenderFunction<WebView, Props> = (
type: string;
value: unknown;
};
console.log({ type, value });
// console.log({ type, value });

switch (type) {
case "theme":
const [fg, bg] = (value as string).split(";");
onThemeChange({ foreground: fg, background: bg });
break;
case "pressImage":
console.log("pressImage", value);
setDLTarget(value as string);
break;
case "share":
console.log("share", value);
// share API workaround
// https://github.com/react-native-webview/react-native-webview/issues/1262#issuecomment-933315821
const param = value as WebShareAPIParam;
Expand Down
2 changes: 0 additions & 2 deletions src/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ export default async function messageHandler(
keys.authSecret
);

console.log("Notification From: " + src);
console.log("Decrypted message: " + raw_msg);
const m = JSON.parse(raw_msg);
const notif = composeNotification(src, m);
if (notif === null) return; // do not show notification
Expand Down

0 comments on commit a87d5bf

Please sign in to comment.