Feature/manga migration (#536)

* Add "migration" tab to "Browse" screen

* Add missing useEffect cleanup for navbar title and actions

* Make "SourceGridLayout" reusable

* Add migration tab to "Browse"

* Add migration logic
This commit is contained in:
schroda
2024-01-26 20:50:51 +01:00
committed by GitHub
parent 5224ad1391
commit e0c5e0521d
39 changed files with 1329 additions and 365 deletions

View File

@@ -48,7 +48,7 @@ function groupByLang(sources: ISource[]) {
export function Sources() {
const { t } = useTranslation();
const { setTitle, setAction } = useContext(NavBarContext);
const { setAction } = useContext(NavBarContext);
const [shownLangs, setShownLangs] = useLocalStorage<string[]>('shownSourceLangs', sourceDefualtLangs());
const [showNsfw] = useLocalStorage<boolean>('showNsfw', true);
@@ -84,7 +84,6 @@ export function Sources() {
}, []);
useEffect(() => {
setTitle(t('source.title'));
setAction(
<>
<Tooltip title={t('search.title.global_search')}>
@@ -100,6 +99,10 @@ export function Sources() {
/>
</>,
);
return () => {
setAction(null);
};
}, [t, shownLangs, sources]);
if (isLoading) return <LoadingPlaceholder />;