eslint: use semicolon TypeScript delimeter
This commit is contained in:
@ -5,33 +5,33 @@ import { useApi, useAppDispatch, useOwnAccount } from 'soapbox/hooks';
|
||||
import toast from 'soapbox/toast';
|
||||
|
||||
export type IAccount = {
|
||||
acct: string
|
||||
avatar: string
|
||||
avatar_static: string
|
||||
bot: boolean
|
||||
created_at: string
|
||||
discoverable: boolean
|
||||
display_name: string
|
||||
followers_count: number
|
||||
following_count: number
|
||||
group: boolean
|
||||
header: string
|
||||
header_static: string
|
||||
id: string
|
||||
last_status_at: string
|
||||
location: string
|
||||
locked: boolean
|
||||
note: string
|
||||
statuses_count: number
|
||||
url: string
|
||||
username: string
|
||||
verified: boolean
|
||||
website: string
|
||||
acct: string;
|
||||
avatar: string;
|
||||
avatar_static: string;
|
||||
bot: boolean;
|
||||
created_at: string;
|
||||
discoverable: boolean;
|
||||
display_name: string;
|
||||
followers_count: number;
|
||||
following_count: number;
|
||||
group: boolean;
|
||||
header: string;
|
||||
header_static: string;
|
||||
id: string;
|
||||
last_status_at: string;
|
||||
location: string;
|
||||
locked: boolean;
|
||||
note: string;
|
||||
statuses_count: number;
|
||||
url: string;
|
||||
username: string;
|
||||
verified: boolean;
|
||||
website: string;
|
||||
}
|
||||
|
||||
type UpdateCredentialsData = {
|
||||
accepts_chat_messages?: boolean
|
||||
chats_onboarded?: boolean
|
||||
accepts_chat_messages?: boolean;
|
||||
chats_onboarded?: boolean;
|
||||
}
|
||||
|
||||
const useUpdateCredentials = () => {
|
||||
|
||||
@ -27,39 +27,39 @@ export enum MessageExpirationValues {
|
||||
}
|
||||
|
||||
export interface IChat {
|
||||
accepted: boolean
|
||||
account: Account
|
||||
chat_type: 'channel' | 'direct'
|
||||
created_at: string
|
||||
created_by_account: string
|
||||
discarded_at: null | string
|
||||
id: string
|
||||
accepted: boolean;
|
||||
account: Account;
|
||||
chat_type: 'channel' | 'direct';
|
||||
created_at: string;
|
||||
created_by_account: string;
|
||||
discarded_at: null | string;
|
||||
id: string;
|
||||
last_message: null | {
|
||||
account_id: string
|
||||
chat_id: string
|
||||
content: string
|
||||
created_at: string
|
||||
discarded_at: string | null
|
||||
id: string
|
||||
unread: boolean
|
||||
}
|
||||
account_id: string;
|
||||
chat_id: string;
|
||||
content: string;
|
||||
created_at: string;
|
||||
discarded_at: string | null;
|
||||
id: string;
|
||||
unread: boolean;
|
||||
};
|
||||
latest_read_message_by_account?: {
|
||||
id: string
|
||||
date: string
|
||||
}[]
|
||||
latest_read_message_created_at: null | string
|
||||
message_expiration?: MessageExpirationValues
|
||||
unread: number
|
||||
id: string;
|
||||
date: string;
|
||||
}[];
|
||||
latest_read_message_created_at: null | string;
|
||||
message_expiration?: MessageExpirationValues;
|
||||
unread: number;
|
||||
}
|
||||
|
||||
type UpdateChatVariables = {
|
||||
message_expiration: MessageExpirationValues
|
||||
message_expiration: MessageExpirationValues;
|
||||
}
|
||||
|
||||
type CreateReactionVariables = {
|
||||
messageId: string
|
||||
emoji: string
|
||||
chatMessage?: ChatMessage
|
||||
messageId: string;
|
||||
emoji: string;
|
||||
chatMessage?: ChatMessage;
|
||||
}
|
||||
|
||||
const ChatKeys = {
|
||||
@ -231,7 +231,7 @@ const useChatActions = (chatId: string) => {
|
||||
};
|
||||
|
||||
const createChatMessage = useMutation(
|
||||
({ chatId, content, mediaIds }: { chatId: string, content: string, mediaIds?: string[] }) => {
|
||||
({ chatId, content, mediaIds }: { chatId: string; content: string; mediaIds?: string[] }) => {
|
||||
return api.post<ChatMessage>(`/api/v1/pleroma/chats/${chatId}/messages`, {
|
||||
content,
|
||||
media_id: (mediaIds && mediaIds.length === 1) ? mediaIds[0] : undefined, // Pleroma backwards-compat
|
||||
|
||||
@ -3,16 +3,16 @@ import { useQuery } from '@tanstack/react-query';
|
||||
import { useApi } from 'soapbox/hooks';
|
||||
|
||||
type Embed = {
|
||||
type: string
|
||||
version: string
|
||||
author_name: string
|
||||
author_url: string
|
||||
provider_name: string
|
||||
provider_url: string
|
||||
cache_age: number
|
||||
html: string
|
||||
width: number
|
||||
height: number
|
||||
type: string;
|
||||
version: string;
|
||||
author_name: string;
|
||||
author_url: string;
|
||||
provider_name: string;
|
||||
provider_url: string;
|
||||
cache_age: number;
|
||||
html: string;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
/** Fetch OEmbed information for a status by its URL. */
|
||||
|
||||
@ -10,16 +10,16 @@ import { PaginatedResult, removePageItem } from '../utils/queries';
|
||||
import type { IAccount } from './accounts';
|
||||
|
||||
type Suggestion = {
|
||||
source: 'staff'
|
||||
account: IAccount
|
||||
source: 'staff';
|
||||
account: IAccount;
|
||||
}
|
||||
|
||||
type Result = {
|
||||
account: string
|
||||
account: string;
|
||||
}
|
||||
|
||||
type PageParam = {
|
||||
link?: string
|
||||
link?: string;
|
||||
}
|
||||
|
||||
const SuggestionKeys = {
|
||||
@ -87,7 +87,7 @@ function useOnboardingSuggestions() {
|
||||
const api = useApi();
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const getV2Suggestions = async (pageParam: any): Promise<{ data: Suggestion[], link: string | undefined, hasMore: boolean }> => {
|
||||
const getV2Suggestions = async (pageParam: any): Promise<{ data: Suggestion[]; link: string | undefined; hasMore: boolean }> => {
|
||||
const link = pageParam?.link || '/api/v2/suggestions';
|
||||
const response = await api.get<Suggestion[]>(link);
|
||||
const hasMore = !!response.headers.link;
|
||||
|
||||
Reference in New Issue
Block a user