ui: optimize bundle

This commit is contained in:
undefined committed 2022-08-24 00:28:25 +08:00
1 parent 9c02ed4dd8
commit 5ae8258b8a
28 files changed
+57 -179

No files matched your search

@@ -7,7 +7,6 @@ import VjNotification from 'vj/components/notification';
import { NamedPage } from 'vj/misc/Page';
import api, { gql } from 'vj/utils/api';
import loadReactRedux from 'vj/utils/loadReactRedux';
import parseQueryString from 'vj/utils/parseQueryString';
const page = new NamedPage('home_messages', () => {
let reduxStore;
@@ -92,10 +91,10 @@ const page = new NamedPage('home_messages', () => {
* A target user id may be assigned in the query string.
*/
async function loadSendTarget() {
const queryString = parseQueryString();
if (!queryString.target) return;
const target = new URL(window.location.href).searchParams.get('target');
if (!target) return;
const user = await api(gql`
users(search: ${queryString.target}, exact: true) {
users(search: ${target}, exact: true) {
_id
uname
avatarUrl