lint
This commit is contained in:
parent
eeaa44bfc9
commit
41fc515087
|
@ -12,7 +12,7 @@ const getDevCssClassPrefix = (filename: string): string => {
|
||||||
return filename
|
return filename
|
||||||
.slice(filename.indexOf(PATH_PREFIX) + PATH_PREFIX.length)
|
.slice(filename.indexOf(PATH_PREFIX) + PATH_PREFIX.length)
|
||||||
.replace('.module.scss', '')
|
.replace('.module.scss', '')
|
||||||
.replace(/[/?\\]/g, '-')
|
.replaceAll(/[/?\\]/g, '-')
|
||||||
}
|
}
|
||||||
|
|
||||||
const devGenerateScopedName = (name: string, filename: string, css: string) =>
|
const devGenerateScopedName = (name: string, filename: string, css: string) =>
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
|
|
||||||
.commentControls {
|
.commentControls {
|
||||||
@include font-size(1.2rem);
|
@include font-size(1.2rem);
|
||||||
|
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +121,7 @@
|
||||||
|
|
||||||
.commentBody {
|
.commentBody {
|
||||||
@include font-size(1.5rem);
|
@include font-size(1.5rem);
|
||||||
|
|
||||||
line-height: 1.47;
|
line-height: 1.47;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,6 +198,7 @@
|
||||||
|
|
||||||
button {
|
button {
|
||||||
@include font-size(1.6rem);
|
@include font-size(1.6rem);
|
||||||
|
|
||||||
margin-left: 1.2rem;
|
margin-left: 1.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import styles from './RatingControl.module.scss'
|
import styles from './RatingControl.module.scss'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { Icon } from '../_shared/Icon'
|
|
||||||
|
|
||||||
interface RatingControlProps {
|
interface RatingControlProps {
|
||||||
rating?: number
|
rating?: number
|
||||||
|
|
|
@ -265,6 +265,7 @@
|
||||||
.authorComments {
|
.authorComments {
|
||||||
.authorName {
|
.authorName {
|
||||||
@include font-size(1.2rem);
|
@include font-size(1.2rem);
|
||||||
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.CreateModalContent {
|
.CreateModalContent {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 3px solid #fff;
|
border: 3px solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imageHolder {
|
.imageHolder {
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -29,9 +30,6 @@
|
||||||
.letter {
|
.letter {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
.letter {
|
|
||||||
margin-bottom: -2px;
|
margin-bottom: -2px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Show, Switch, Match, createMemo, For } from 'solid-js'
|
import { Show, Switch, Match, createMemo } from 'solid-js'
|
||||||
import DialogAvatar from './DialogAvatar'
|
import DialogAvatar from './DialogAvatar'
|
||||||
import type { ChatMember } from '../../graphql/types.gen'
|
import type { ChatMember } from '../../graphql/types.gen'
|
||||||
import GroupDialogAvatar from './GroupDialogAvatar'
|
import GroupDialogAvatar from './GroupDialogAvatar'
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
|
||||||
.grouped {
|
.grouped {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
@ -46,6 +47,7 @@
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.own {
|
&.own {
|
||||||
.body {
|
.body {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
@ -54,6 +56,7 @@
|
||||||
background: #000;
|
background: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { clsx } from 'clsx'
|
||||||
import { useRouter } from '../../stores/router'
|
import { useRouter } from '../../stores/router'
|
||||||
import { t } from '../../utils/intl'
|
import { t } from '../../utils/intl'
|
||||||
import { Icon } from '../_shared/Icon'
|
import { Icon } from '../_shared/Icon'
|
||||||
import { createEffect, createSignal, Show } from 'solid-js'
|
import { createSignal, Show } from 'solid-js'
|
||||||
import Notifications from './Notifications'
|
import Notifications from './Notifications'
|
||||||
import { ProfilePopup } from './ProfilePopup'
|
import { ProfilePopup } from './ProfilePopup'
|
||||||
import Userpic from '../Author/Userpic'
|
import Userpic from '../Author/Userpic'
|
||||||
|
|
|
@ -17,7 +17,7 @@ interface ModalProps {
|
||||||
export const Modal = (props: ModalProps) => {
|
export const Modal = (props: ModalProps) => {
|
||||||
const { modal } = useModalStore()
|
const { modal } = useModalStore()
|
||||||
|
|
||||||
const backdropClick = (event: Event) => {
|
const backdropClick = () => {
|
||||||
hideModal()
|
hideModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ export const ProfileSecurityPage = (props: PageProps) => {
|
||||||
<h5>Google</h5>
|
<h5>Google</h5>
|
||||||
<div class="pretty-form__item">
|
<div class="pretty-form__item">
|
||||||
<p>
|
<p>
|
||||||
<button class={clsx('button button--light', styles.socialButton)} type="button">
|
<button class={clsx('button', 'button--light', styles.socialButton)} type="button">
|
||||||
<Icon name="google" class={styles.icon} />
|
<Icon name="google" class={styles.icon} />
|
||||||
Привязать
|
Привязать
|
||||||
</button>
|
</button>
|
||||||
|
@ -82,7 +82,7 @@ export const ProfileSecurityPage = (props: PageProps) => {
|
||||||
<h5>VK</h5>
|
<h5>VK</h5>
|
||||||
<div class="pretty-form__item">
|
<div class="pretty-form__item">
|
||||||
<p>
|
<p>
|
||||||
<button class={clsx(styles.socialButton, 'button button--light')} type="button">
|
<button class={clsx(styles.socialButton, 'button', 'button--light')} type="button">
|
||||||
<Icon name="vk" class={styles.icon} />
|
<Icon name="vk" class={styles.icon} />
|
||||||
Привязать
|
Привязать
|
||||||
</button>
|
</button>
|
||||||
|
@ -92,7 +92,7 @@ export const ProfileSecurityPage = (props: PageProps) => {
|
||||||
<h5>Facebook</h5>
|
<h5>Facebook</h5>
|
||||||
<div class="pretty-form__item">
|
<div class="pretty-form__item">
|
||||||
<p>
|
<p>
|
||||||
<button class={clsx(styles.socialButton, 'button button--light')} type="button">
|
<button class={clsx(styles.socialButton, 'button', 'button--light')} type="button">
|
||||||
<Icon name="facebook" class={styles.icon} />
|
<Icon name="facebook" class={styles.icon} />
|
||||||
Привязать
|
Привязать
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -9,6 +9,7 @@ h4 {
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
@include font-size(1.7rem);
|
@include font-size(1.7rem);
|
||||||
|
|
||||||
margin: 0 0 0.8rem;
|
margin: 0 0 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { capitalize } from '../../utils'
|
import { capitalize } from '../../utils'
|
||||||
import styles from './Card.module.scss'
|
import styles from './Card.module.scss'
|
||||||
import { createEffect, createMemo, createSignal, Show } from 'solid-js'
|
import { createMemo, createSignal, Show } from 'solid-js'
|
||||||
import type { Topic } from '../../graphql/types.gen'
|
import type { Topic } from '../../graphql/types.gen'
|
||||||
import { FollowingEntity } from '../../graphql/types.gen'
|
import { FollowingEntity } from '../../graphql/types.gen'
|
||||||
import { t } from '../../utils/intl'
|
import { t } from '../../utils/intl'
|
||||||
|
@ -8,7 +8,6 @@ import { follow, unfollow } from '../../stores/zine/common'
|
||||||
import { getLogger } from '../../utils/logger'
|
import { getLogger } from '../../utils/logger'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { useSession } from '../../context/session'
|
import { useSession } from '../../context/session'
|
||||||
import { StatMetrics } from '../_shared/StatMetrics'
|
|
||||||
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
|
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
|
||||||
|
|
||||||
const log = getLogger('TopicCard')
|
const log = getLogger('TopicCard')
|
||||||
|
|
|
@ -29,7 +29,7 @@ const userSearch = (array: Author[], keyword: string) => {
|
||||||
export const InboxView = () => {
|
export const InboxView = () => {
|
||||||
const {
|
const {
|
||||||
chats,
|
chats,
|
||||||
actions: { loadChats, setListener }
|
actions: { loadChats } // setListener
|
||||||
} = useInbox()
|
} = useInbox()
|
||||||
const [messages, setMessages] = createSignal<MessageType[]>([])
|
const [messages, setMessages] = createSignal<MessageType[]>([])
|
||||||
const [recipients, setRecipients] = createSignal<Author[]>([])
|
const [recipients, setRecipients] = createSignal<Author[]>([])
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import styles from './SearchField.module.scss'
|
import styles from './SearchField.module.scss'
|
||||||
import { Icon } from './Icon'
|
import { Icon } from './Icon'
|
||||||
import { t } from '../../utils/intl'
|
import { t } from '../../utils/intl'
|
||||||
import clsx from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
|
|
||||||
type SearchFieldProps = {
|
type SearchFieldProps = {
|
||||||
onChange: (value: string) => void
|
onChange: (value: string) => void
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'swiper/scss'
|
||||||
import 'swiper/scss/navigation'
|
import 'swiper/scss/navigation'
|
||||||
import 'swiper/scss/pagination'
|
import 'swiper/scss/pagination'
|
||||||
import './Slider.scss'
|
import './Slider.scss'
|
||||||
import { createEffect, createMemo, createSignal, Show, For, JSX } from 'solid-js'
|
import { createEffect, createSignal, JSX } from 'solid-js'
|
||||||
import { Icon } from './Icon'
|
import { Icon } from './Icon'
|
||||||
|
|
||||||
interface SliderProps {
|
interface SliderProps {
|
||||||
|
|
|
@ -8,18 +8,18 @@ import {
|
||||||
} from '@urql/core'
|
} from '@urql/core'
|
||||||
// import { createClient as createSSEClient } from 'graphql-sse'
|
// import { createClient as createSSEClient } from 'graphql-sse'
|
||||||
import { createClient as createWSClient } from 'graphql-ws'
|
import { createClient as createWSClient } from 'graphql-ws'
|
||||||
// import { devtoolsExchange } from '@urql/devtools'
|
import { devtoolsExchange } from '@urql/devtools'
|
||||||
import { isDev, apiBaseUrl } from '../utils/config'
|
import { isDev, apiBaseUrl } from '../utils/config'
|
||||||
// import { cache } from './cache'
|
// import { cache } from './cache'
|
||||||
|
|
||||||
const TOKEN_LOCAL_STORAGE_KEY = 'token'
|
const TOKEN_LOCAL_STORAGE_KEY = 'token'
|
||||||
|
|
||||||
const exchanges: Exchange[] = [dedupExchange, fetchExchange]
|
const exchanges: Exchange[] = [dedupExchange, fetchExchange]
|
||||||
/*
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
exchanges.unshift(devtoolsExchange)
|
exchanges.unshift(devtoolsExchange)
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
export const getToken = (): string => {
|
export const getToken = (): string => {
|
||||||
return localStorage.getItem(TOKEN_LOCAL_STORAGE_KEY)
|
return localStorage.getItem(TOKEN_LOCAL_STORAGE_KEY)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ export type AuthResult = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Author = {
|
export type Author = {
|
||||||
|
about?: Maybe<Scalars['String']>
|
||||||
bio?: Maybe<Scalars['String']>
|
bio?: Maybe<Scalars['String']>
|
||||||
caption?: Maybe<Scalars['String']>
|
caption?: Maybe<Scalars['String']>
|
||||||
id: Scalars['Int']
|
id: Scalars['Int']
|
||||||
|
@ -54,9 +55,9 @@ export type AuthorsBy = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Chat = {
|
export type Chat = {
|
||||||
admins?: Maybe<Array<Maybe<Scalars['Int']>>>
|
admins?: Maybe<Array<Maybe<Scalars['String']>>>
|
||||||
createdAt: Scalars['Int']
|
createdAt: Scalars['Int']
|
||||||
createdBy: Scalars['Int']
|
createdBy: Scalars['String']
|
||||||
description?: Maybe<Scalars['String']>
|
description?: Maybe<Scalars['String']>
|
||||||
id: Scalars['String']
|
id: Scalars['String']
|
||||||
members?: Maybe<Array<Maybe<ChatMember>>>
|
members?: Maybe<Array<Maybe<ChatMember>>>
|
||||||
|
@ -65,7 +66,7 @@ export type Chat = {
|
||||||
title?: Maybe<Scalars['String']>
|
title?: Maybe<Scalars['String']>
|
||||||
unread?: Maybe<Scalars['Int']>
|
unread?: Maybe<Scalars['Int']>
|
||||||
updatedAt: Scalars['Int']
|
updatedAt: Scalars['Int']
|
||||||
users?: Maybe<Array<Maybe<Scalars['Int']>>>
|
users?: Maybe<Array<Maybe<Scalars['String']>>>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ChatInput = {
|
export type ChatInput = {
|
||||||
|
@ -78,7 +79,6 @@ export type ChatMember = {
|
||||||
id: Scalars['Int']
|
id: Scalars['Int']
|
||||||
lastSeen?: Maybe<Scalars['DateTime']>
|
lastSeen?: Maybe<Scalars['DateTime']>
|
||||||
name: Scalars['String']
|
name: Scalars['String']
|
||||||
online?: Maybe<Scalars['Boolean']>
|
|
||||||
slug: Scalars['String']
|
slug: Scalars['String']
|
||||||
userpic?: Maybe<Scalars['String']>
|
userpic?: Maybe<Scalars['String']>
|
||||||
}
|
}
|
||||||
|
@ -140,13 +140,12 @@ export type LoadShoutsOptions = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Message = {
|
export type Message = {
|
||||||
author: Scalars['Int']
|
author: Scalars['String']
|
||||||
body: Scalars['String']
|
body: Scalars['String']
|
||||||
chatId: Scalars['String']
|
chatId: Scalars['String']
|
||||||
createdAt: Scalars['Int']
|
createdAt: Scalars['Int']
|
||||||
id: Scalars['Int']
|
id: Scalars['Int']
|
||||||
replyTo?: Maybe<Scalars['String']>
|
replyTo?: Maybe<Scalars['String']>
|
||||||
seen?: Maybe<Scalars['Boolean']>
|
|
||||||
updatedAt?: Maybe<Scalars['Int']>
|
updatedAt?: Maybe<Scalars['Int']>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +354,6 @@ export type Query = {
|
||||||
loadShout?: Maybe<Shout>
|
loadShout?: Maybe<Shout>
|
||||||
loadShouts: Array<Maybe<Shout>>
|
loadShouts: Array<Maybe<Shout>>
|
||||||
markdownBody: Scalars['String']
|
markdownBody: Scalars['String']
|
||||||
searchMessages: Result
|
|
||||||
searchRecipients: Result
|
searchRecipients: Result
|
||||||
signIn: AuthResult
|
signIn: AuthResult
|
||||||
signOut: AuthResult
|
signOut: AuthResult
|
||||||
|
@ -420,12 +418,6 @@ export type QueryMarkdownBodyArgs = {
|
||||||
body: Scalars['String']
|
body: Scalars['String']
|
||||||
}
|
}
|
||||||
|
|
||||||
export type QuerySearchMessagesArgs = {
|
|
||||||
by: MessagesBy
|
|
||||||
limit?: InputMaybe<Scalars['Int']>
|
|
||||||
offset?: InputMaybe<Scalars['Int']>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type QuerySearchRecipientsArgs = {
|
export type QuerySearchRecipientsArgs = {
|
||||||
limit?: InputMaybe<Scalars['Int']>
|
limit?: InputMaybe<Scalars['Int']>
|
||||||
offset?: InputMaybe<Scalars['Int']>
|
offset?: InputMaybe<Scalars['Int']>
|
||||||
|
@ -630,7 +622,14 @@ export type Stat = {
|
||||||
|
|
||||||
export type Subscription = {
|
export type Subscription = {
|
||||||
newMessage: Message
|
newMessage: Message
|
||||||
collabUpdate: Reaction
|
onlineUpdated: Array<User>
|
||||||
|
reactionUpdated: ReactionUpdating
|
||||||
|
shoutUpdated: Shout
|
||||||
|
userUpdated: User
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SubscriptionNewMessageArgs = {
|
||||||
|
chats?: InputMaybe<Array<Scalars['Int']>>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SubscriptionReactionUpdatedArgs = {
|
export type SubscriptionReactionUpdatedArgs = {
|
||||||
|
|
|
@ -60,6 +60,7 @@ img {
|
||||||
|
|
||||||
.shoutMediaBody {
|
.shoutMediaBody {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
audio {
|
audio {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -258,6 +259,7 @@ img {
|
||||||
|
|
||||||
.commentsHeader {
|
.commentsHeader {
|
||||||
@include font-size(2.4rem);
|
@include font-size(2.4rem);
|
||||||
|
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,6 +289,7 @@ img {
|
||||||
|
|
||||||
button {
|
button {
|
||||||
@include font-size(1.5rem);
|
@include font-size(1.5rem);
|
||||||
|
|
||||||
border-radius: 0.8rem;
|
border-radius: 0.8rem;
|
||||||
margin-right: 1.2rem;
|
margin-right: 1.2rem;
|
||||||
padding: 1.1rem 1.2rem 0.9rem;
|
padding: 1.1rem 1.2rem 0.9rem;
|
||||||
|
|
|
@ -111,6 +111,7 @@ main {
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
color: #696969;
|
color: #696969;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
span {
|
span {
|
||||||
border-bottom: 3px solid;
|
border-bottom: 3px solid;
|
||||||
|
@ -134,10 +135,10 @@ main {
|
||||||
|
|
||||||
.message-form {
|
.message-form {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 2px 0 12px 0;
|
padding: 2px 0 12px;
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
border: 2px solid #cccccc;
|
border: 2px solid #ccc;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -233,9 +234,9 @@ main {
|
||||||
}
|
}
|
||||||
|
|
||||||
time {
|
time {
|
||||||
background: #fff;
|
|
||||||
@include font-size(1.5rem);
|
@include font-size(1.5rem);
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
color: #9fa1a7;
|
color: #9fa1a7;
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,8 +85,8 @@ h2 {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-left: -0.15em;
|
margin-left: -0.15em;
|
||||||
padding: 0 0.15em;
|
padding: 0 0.15em;
|
||||||
box-decoration-break: clone;
|
|
||||||
-webkit-box-decoration-break: clone;
|
-webkit-box-decoration-break: clone;
|
||||||
|
box-decoration-break: clone;
|
||||||
|
|
||||||
&::selection {
|
&::selection {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
@ -804,5 +804,6 @@ details {
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
@include font-size(1.4rem);
|
@include font-size(1.4rem);
|
||||||
|
|
||||||
color: rgba(0 0 0 / 40%);
|
color: rgba(0 0 0 / 40%);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import type {
|
||||||
MutationCreateMessageArgs,
|
MutationCreateMessageArgs,
|
||||||
Chat,
|
Chat,
|
||||||
QueryLoadRecipientsArgs,
|
QueryLoadRecipientsArgs,
|
||||||
User,
|
|
||||||
ProfileInput
|
ProfileInput
|
||||||
} from '../graphql/types.gen'
|
} from '../graphql/types.gen'
|
||||||
import { publicGraphQLClient } from '../graphql/publicGraphQLClient'
|
import { publicGraphQLClient } from '../graphql/publicGraphQLClient'
|
||||||
|
|
|
@ -4,7 +4,7 @@ export const groupByName = (arr: Author[]) => {
|
||||||
return arr.reduce(
|
return arr.reduce(
|
||||||
(acc, tt) => {
|
(acc, tt) => {
|
||||||
let c = (tt.name || '')
|
let c = (tt.name || '')
|
||||||
.replace(/[^\d A-Za-zА-я]/g, '')
|
.replaceAll(/[^\d A-Za-zА-я]/g, '')
|
||||||
.split(' ')
|
.split(' ')
|
||||||
.pop()
|
.pop()
|
||||||
.slice(0, 1)
|
.slice(0, 1)
|
||||||
|
@ -24,7 +24,7 @@ export const groupByTitle = (arr: (Shout | Topic)[]) => {
|
||||||
return arr.reduce(
|
return arr.reduce(
|
||||||
(acc, tt) => {
|
(acc, tt) => {
|
||||||
let c = (tt.title || '')
|
let c = (tt.title || '')
|
||||||
.replace(/[^\d A-Za-zА-я]/g, '')
|
.replaceAll(/[^\d A-Za-zА-я]/g, '')
|
||||||
.slice(0, 1)
|
.slice(0, 1)
|
||||||
.toUpperCase()
|
.toUpperCase()
|
||||||
if (/[^А-я]/.test(c)) c = 'A-Z'
|
if (/[^А-я]/.test(c)) c = 'A-Z'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user