mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
remove unused comment
This commit is contained in:
parent
d7f5828710
commit
4f427d5700
2
client/demo/dist/index.js
vendored
2
client/demo/dist/index.js
vendored
@ -1181,7 +1181,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useMessageBuilder: () => (/* binding */ useMessageBuilder)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar useMessageBuilder = function useMessageBuilder() {\n var messagesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);\n var setMessage = function setMessage(file, id, message) {\n if (messagesRef.current.find(function (x) {\n return x.file == file && x.id == id;\n })) {\n console.warn(\"duplicate message is registerd\", file, id, message);\n } else {\n messagesRef.current.push({\n file: file,\n id: id,\n message: message\n });\n }\n };\n var getMessage = function getMessage(file, id) {\n var _messagesRef$current$;\n var lang = window.navigator.language;\n if (lang != \"ja\") {\n lang = \"en\";\n }\n console.log(messagesRef.current);\n return ((_messagesRef$current$ = messagesRef.current.find(function (x) {\n return x.file == file && x.id == id;\n })) === null || _messagesRef$current$ === void 0 ? void 0 : _messagesRef$current$.message[lang]) || \"unknwon message\";\n };\n return {\n setMessage: setMessage,\n getMessage: getMessage\n };\n};\n\n//# sourceURL=webpack://demo/./src/hooks/useMessageBuilder.ts?");
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useMessageBuilder: () => (/* binding */ useMessageBuilder)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar useMessageBuilder = function useMessageBuilder() {\n var messagesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);\n var setMessage = function setMessage(file, id, message) {\n if (messagesRef.current.find(function (x) {\n return x.file == file && x.id == id;\n })) {\n console.warn(\"duplicate message is registerd\", file, id, message);\n } else {\n messagesRef.current.push({\n file: file,\n id: id,\n message: message\n });\n }\n };\n var getMessage = function getMessage(file, id) {\n var _messagesRef$current$;\n var lang = window.navigator.language;\n if (lang != \"ja\") {\n lang = \"en\";\n }\n return ((_messagesRef$current$ = messagesRef.current.find(function (x) {\n return x.file == file && x.id == id;\n })) === null || _messagesRef$current$ === void 0 ? void 0 : _messagesRef$current$.message[lang]) || \"unknwon message\";\n };\n return {\n setMessage: setMessage,\n getMessage: getMessage\n };\n};\n\n//# sourceURL=webpack://demo/./src/hooks/useMessageBuilder.ts?");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -26,8 +26,6 @@ export const useMessageBuilder = (): MessageBuilderStateAndMethod => {
|
|||||||
if (lang != "ja") {
|
if (lang != "ja") {
|
||||||
lang = "en"
|
lang = "en"
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(messagesRef.current)
|
|
||||||
return messagesRef.current.find(x => { return x.file == file && x.id == id })?.message[lang] || "unknwon message"
|
return messagesRef.current.find(x => { return x.file == file && x.id == id })?.message[lang] || "unknwon message"
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user