mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix ci warnings
This commit is contained in:
13 files changed
+30
-22
No files matched your search
@@ -9,7 +9,7 @@ import ReactDOM from 'react-dom/client';
|
||||
import { AutoloadPage } from 'vj/misc/Page';
|
||||
import { request } from 'vj/utils';
|
||||
|
||||
function renderReactions(reactions, self, rootEle) {
|
||||
function renderReactions(reactions = {}, self = {}, rootEle) {
|
||||
let html = '';
|
||||
for (const [k, v] of Object.entries(reactions).sort(([, v1], [, v2]) => +v2 - +v1)) {
|
||||
if (!v) continue;
|
||||
|
||||
@@ -50,12 +50,17 @@ export default new AutoloadPage('omnibar', () => {
|
||||
href={`${base}/p/${pid || docId}`}
|
||||
>
|
||||
<div>
|
||||
<a
|
||||
href={psdict[`${domainId}#${docId}`]?.rid && `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`}
|
||||
<p
|
||||
onClick={(ev) => {
|
||||
if (psdict[`${domainId}#${docId}`]?.rid) {
|
||||
window.location.href = `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`;
|
||||
}
|
||||
ev.preventDefault();
|
||||
}}
|
||||
className={`record-status--text ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}
|
||||
>
|
||||
<span className={`icon record-status--icon ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}></span>
|
||||
</a>
|
||||
</p>
|
||||
<div>{title}</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Reference in new issue
Block a user