rename ExtensionLangSelect: generic name for generic use
This commit is contained in:
@@ -47,7 +47,7 @@ interface IProps {
|
||||
forcedLangs?: string[]
|
||||
}
|
||||
|
||||
export default function ExtensionLangSelect(props: IProps) {
|
||||
export default function LangSelect(props: IProps) {
|
||||
const {
|
||||
shownLangs, setShownLangs, allLangs, forcedLangs,
|
||||
} = props;
|
||||
@@ -125,6 +125,6 @@ export default function ExtensionLangSelect(props: IProps) {
|
||||
);
|
||||
}
|
||||
|
||||
ExtensionLangSelect.defaultProps = {
|
||||
LangSelect.defaultProps = {
|
||||
forcedLangs: [] as string[],
|
||||
};
|
||||
@@ -10,7 +10,7 @@ import ExtensionCard from 'components/anime/ExtensionCard';
|
||||
import NavbarContext from 'context/NavbarContext';
|
||||
import client from 'util/client';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import ExtensionLangSelect from 'components/manga/ExtensionLangSelect';
|
||||
import LangSelect from 'components/manga/LangSelect';
|
||||
import { extensionDefaultLangs, langCodeToName, langSortCmp } from 'util/language';
|
||||
|
||||
const allLangs: string[] = [];
|
||||
@@ -49,7 +49,7 @@ export default function AnimeExtensions() {
|
||||
useEffect(() => {
|
||||
setTitle('Extensions');
|
||||
setAction(
|
||||
<ExtensionLangSelect
|
||||
<LangSelect
|
||||
shownLangs={shownLangs}
|
||||
setShownLangs={setShownLangs}
|
||||
allLangs={allLangs}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import ExtensionLangSelect from 'components/manga/ExtensionLangSelect';
|
||||
import LangSelect from 'components/manga/LangSelect';
|
||||
import SourceCard from 'components/anime/SourceCard';
|
||||
import NavbarContext from 'context/NavbarContext';
|
||||
import client from 'util/client';
|
||||
@@ -45,7 +45,7 @@ export default function AnimeSources() {
|
||||
useEffect(() => {
|
||||
setTitle('Sources');
|
||||
setAction(
|
||||
<ExtensionLangSelect
|
||||
<LangSelect
|
||||
shownLangs={shownLangs}
|
||||
setShownLangs={setShownLangs}
|
||||
allLangs={sourceToLangList(sources)}
|
||||
|
||||
@@ -13,7 +13,7 @@ import ExtensionCard from 'components/manga/ExtensionCard';
|
||||
import NavbarContext from 'context/NavbarContext';
|
||||
import client from 'util/client';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import ExtensionLangSelect from 'components/manga/ExtensionLangSelect';
|
||||
import LangSelect from 'components/manga/LangSelect';
|
||||
import { extensionDefaultLangs, langCodeToName, langSortCmp } from 'util/language';
|
||||
import { makeToaster } from 'components/Toast';
|
||||
|
||||
@@ -63,7 +63,7 @@ export default function MangaExtensions() {
|
||||
>
|
||||
<AddIcon />
|
||||
</IconButton>
|
||||
<ExtensionLangSelect
|
||||
<LangSelect
|
||||
shownLangs={shownLangs}
|
||||
setShownLangs={setShownLangs}
|
||||
allLangs={allLangs}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import ExtensionLangSelect from 'components/manga/ExtensionLangSelect';
|
||||
import LangSelect from 'components/manga/LangSelect';
|
||||
import SourceCard from 'components/manga/SourceCard';
|
||||
import NavbarContext from 'context/NavbarContext';
|
||||
import client from 'util/client';
|
||||
@@ -64,7 +64,7 @@ export default function MangaSources() {
|
||||
useEffect(() => {
|
||||
setTitle('Sources');
|
||||
setAction(
|
||||
<ExtensionLangSelect
|
||||
<LangSelect
|
||||
shownLangs={shownLangs}
|
||||
setShownLangs={setShownLangs}
|
||||
allLangs={sourceToLangList(sources)}
|
||||
|
||||
Reference in New Issue
Block a user