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