mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(knip): trim dead exports and tool noise
This commit is contained in:
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
import type { DirectoryCommunity } from './use-directories';
|
||||
import { computeGuiPostsPerPage, getBoardFeedPageSizeConstants, type CommunityWithPostsPerPage } from '../lib/utils/board-feed-pagination';
|
||||
|
||||
export type BoardFeedPageSize = ReturnType<typeof getBoardFeedPageSizeConstants>;
|
||||
type BoardFeedPageSize = ReturnType<typeof getBoardFeedPageSizeConstants>;
|
||||
|
||||
/**
|
||||
* Compute board feed page-size values from directory community.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import directoriesData from '../data/5chan-directories.json';
|
||||
|
||||
export interface DirectoriesMetadata {
|
||||
interface DirectoriesMetadata {
|
||||
title: string;
|
||||
description: string;
|
||||
createdAt: number;
|
||||
@@ -36,7 +36,7 @@ export interface DirectoriesData {
|
||||
communities: DirectoryCommunity[];
|
||||
}
|
||||
|
||||
export interface DirectoriesState {
|
||||
interface DirectoriesState {
|
||||
communities: DirectoryCommunity[];
|
||||
loading: boolean;
|
||||
error: Error | null;
|
||||
|
||||
@@ -19,7 +19,7 @@ const setCachedGifFrame = async (url: string, frameUrl: string): Promise<void> =
|
||||
await gifFrameDb.setItem(url, frameUrl);
|
||||
};
|
||||
|
||||
export const fetchImage = (url: string): Promise<ArrayBuffer> => {
|
||||
const fetchImage = (url: string): Promise<ArrayBuffer> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const request = new XMLHttpRequest();
|
||||
request.open('GET', url, true);
|
||||
@@ -35,7 +35,7 @@ export const fetchImage = (url: string): Promise<ArrayBuffer> => {
|
||||
});
|
||||
};
|
||||
|
||||
export const readImage = (file: File): Promise<ArrayBuffer> => {
|
||||
const readImage = (file: File): Promise<ArrayBuffer> => {
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
|
||||
@@ -92,7 +92,7 @@ function getRuntime(): 'web' | 'electron' | 'android' {
|
||||
return 'web';
|
||||
}
|
||||
|
||||
export interface UseFileUploadOptions {
|
||||
interface UseFileUploadOptions {
|
||||
onUploadComplete: (url: string, fileName: string) => void;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useDirectoryByAddress } from './use-directories';
|
||||
import { useBoardFeedPageSize } from './use-board-feed-page-size';
|
||||
import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution';
|
||||
|
||||
export interface UsePostPageNumberOptions {
|
||||
interface UsePostPageNumberOptions {
|
||||
subplebbitAddress: string | undefined;
|
||||
postCid: string | undefined;
|
||||
/** When false, page segment is excluded (e.g. pending-post view). When true, resolve and show page. */
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
|
||||
import { useSubplebbitStats } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { create } from 'zustand';
|
||||
|
||||
export type SubplebbitsStatsState = {
|
||||
type SubplebbitsStatsState = {
|
||||
subplebbitsStats: { [subplebbitAddress: string]: any };
|
||||
setSubplebbitStats: (subplebbitAddress: string, stats: any) => void;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user