pl-fe: Exports/deps cleanup

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-05 17:17:59 +01:00
parent 470b350ba3
commit 190fca998e
8 changed files with 8 additions and 30 deletions

View file

@ -81,7 +81,6 @@
"detect-passive-events": "^2.0.0",
"emoji-datasource": "15.0.1",
"emoji-mart": "^5.6.0",
"escape-html": "^1.0.3",
"exifr": "^7.1.3",
"fasttext.wasm.js": "^1.0.0",
"flexsearch": "^0.7.43",
@ -153,10 +152,8 @@
"@testing-library/react": "^16.0.1",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/escape-html": "^1.0.4",
"@types/leaflet": "^1.9.12",
"@types/lodash": "^4.17.9",
"@types/object-assign": "^4.0.33",
"@types/path-browserify": "^1.0.3",
"@types/react": "^18.3.11",
"@types/react-color": "^3.0.12",
@ -166,7 +163,6 @@
"@types/react-sparklines": "^1.7.5",
"@types/react-swipeable-views": "^0.13.5",
"@types/redux-mock-store": "^1.0.6",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.0",
"eslint": "^8.57.1",

View file

@ -569,7 +569,6 @@ const Video: React.FC<IVideo> = ({
export {
formatTime,
findElementPosition,
getPointerPosition,
Video as default,
};

View file

@ -7,10 +7,10 @@ import {
FOLLOWED_HASHTAGS_EXPAND_REQUEST,
FOLLOWED_HASHTAGS_EXPAND_SUCCESS,
FOLLOWED_HASHTAGS_EXPAND_FAIL,
TagsAction,
} from 'pl-fe/actions/tags';
import type { PaginatedResponse, Tag } from 'pl-api';
import type { AnyAction } from 'redux';
const ReducerRecord = ImmutableRecord({
items: ImmutableList<Tag>(),
@ -18,7 +18,7 @@ const ReducerRecord = ImmutableRecord({
next: null as (() => Promise<PaginatedResponse<Tag>>) | null,
});
const followed_tags = (state = ReducerRecord(), action: AnyAction) => {
const followed_tags = (state = ReducerRecord(), action: TagsAction) => {
switch (action.type) {
case FOLLOWED_HASHTAGS_FETCH_REQUEST:
return state.set('isLoading', true);

View file

@ -6,14 +6,14 @@ import {
HASHTAG_FOLLOW_FAIL,
HASHTAG_UNFOLLOW_REQUEST,
HASHTAG_UNFOLLOW_FAIL,
type TagsAction,
} from 'pl-fe/actions/tags';
import type { Tag } from 'pl-api';
import type { AnyAction } from 'redux';
const initialState = ImmutableMap<string, Tag>();
const tags = (state = initialState, action: AnyAction) => {
const tags = (state = initialState, action: TagsAction) => {
switch (action.type) {
case HASHTAG_FETCH_SUCCESS:
return state.set(action.name, action.tag);

View file

@ -1,9 +1,8 @@
import { Record as ImmutableRecord } from 'immutable';
import { TRENDING_STATUSES_FETCH_REQUEST, TRENDING_STATUSES_FETCH_SUCCESS } from 'pl-fe/actions/trending-statuses';
import { TRENDING_STATUSES_FETCH_REQUEST, TRENDING_STATUSES_FETCH_SUCCESS, type TrendingStatusesAction } from 'pl-fe/actions/trending-statuses';
import type { Status } from 'pl-api';
import type { AnyAction } from 'redux';
const ReducerRecord = ImmutableRecord({
items: Array<string>(),
@ -20,7 +19,7 @@ const importStatuses = (state: State, statuses: Array<Status>) =>
state.set('isLoading', false);
});
const trending_statuses = (state: State = ReducerRecord(), action: AnyAction) => {
const trending_statuses = (state: State = ReducerRecord(), action: TrendingStatusesAction) => {
switch (action.type) {
case TRENDING_STATUSES_FETCH_REQUEST:
return state.set('isLoading', true);

View file

@ -356,7 +356,6 @@ const makeGetStatusIds = () => createSelector([
export {
type RemoteInstance,
selectAccount,
selectAccounts,
selectOwnAccount,
makeGetAccount,
getFilters,

View file

@ -103,4 +103,4 @@ const useModalsStore = create<State>((set) => ({
})),
}));
export { useModalsStore, type OpenModalProps };
export { useModalsStore };

View file

@ -2441,11 +2441,6 @@
resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.39.13.tgz#afeb1648648dc096efe57983e20387627306e2aa"
integrity sha512-cFq+fO/isvhvmuP/+Sl4K4jtU6E23DoivtbO4r50e3odaxAiVdbfSYRDdJ4gCdxx+3aRjhphS5ZMwIH4hFy/Cw==
"@types/escape-html@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/escape-html/-/escape-html-1.0.4.tgz#dc7c166b76c7b03b27e32f80edf01d91eb5d9af2"
integrity sha512-qZ72SFTgUAZ5a7Tj6kf2SHLetiH5S6f8G5frB2SPQ3EyF02kxdyBFf4Tz4banE3xCgGnKgWLt//a6VuYHKYJTg==
"@types/eslint@9":
version "9.6.1"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584"
@ -2541,11 +2536,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"
integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==
"@types/object-assign@^4.0.33":
version "4.0.33"
resolved "https://registry.yarnpkg.com/@types/object-assign/-/object-assign-4.0.33.tgz#62546e6192d6fa639b040afdbb514bb10daff2dd"
integrity sha512-HeuamLPmpVPuJU/oY7z/YGAezy4HFy6mhvzwupi9Xc8n0FKY8tR1/U3AKaOn/I5Mb4dvbw2szSYcXi84eW07TQ==
"@types/path-browserify@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@types/path-browserify/-/path-browserify-1.0.3.tgz#25de712d4def94b3901f033c30d3d3bd16eba8d3"
@ -2646,7 +2636,7 @@
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975"
integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==
"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.8":
"@types/semver@^7.3.12", "@types/semver@^7.5.0":
version "7.5.8"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e"
integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==
@ -4704,11 +4694,6 @@ escalade@^3.2.0:
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
escape-html@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"