mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Fix navigation after login
This commit is contained in:
parent
c18e34d2eb
commit
63629afede
|
@ -51,7 +51,7 @@ function SearchPanel({ total, filtered, setFilter }: SearchPanelProps) {
|
|||
useLayoutEffect(() => {
|
||||
const searchFilter = new URLSearchParams(search).get('filter') as LibraryFilterStrategy | null;
|
||||
if (searchFilter === null) {
|
||||
navigate(`/library?filter=${strategy}`);
|
||||
navigate(`/library?filter=${strategy}`, { replace: true });
|
||||
return;
|
||||
}
|
||||
const inputStrategy = searchFilter && Object.values(LibraryFilterStrategy).includes(searchFilter) ? searchFilter : LibraryFilterStrategy.MANUAL;
|
||||
|
|
|
@ -61,10 +61,19 @@ function LoginPage() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className='flex items-center justify-center w-full select-none' style={{minHeight: mainHeight}}>
|
||||
<div className='flex items-start justify-center w-full pt-4 select-none' style={{minHeight: mainHeight}}>
|
||||
{ user &&
|
||||
<div className='py-2 font-semibold'>
|
||||
{`Вы вошли в систему как ${user.username}`}
|
||||
<div className='flex flex-col items-center gap-2'>
|
||||
<p className='font-semibold'>{`Вы вошли в систему как ${user.username}`}</p>
|
||||
<p>
|
||||
<TextURL text='Создать схему' href='/rsform-create'/>
|
||||
<span> | </span>
|
||||
<TextURL text='Библиотека' href='/library'/>
|
||||
<span> | </span>
|
||||
<TextURL text='Справка' href='/manuals'/>
|
||||
<span> | </span>
|
||||
<TextURL text='Выйти' href='/logout'/>
|
||||
</p>
|
||||
</div>}
|
||||
{ !user &&
|
||||
<Form
|
||||
|
|
|
@ -5,8 +5,8 @@ import { TabList, TabPanel, Tabs } from 'react-tabs';
|
|||
import { toast } from 'react-toastify';
|
||||
|
||||
import BackendError from '../../components/BackendError';
|
||||
import ConceptTab from '../../components/Common/ConceptTab';
|
||||
import { ConceptLoader } from '../../components/Common/ConceptLoader';
|
||||
import ConceptTab from '../../components/Common/ConceptTab';
|
||||
import { useLibrary } from '../../context/LibraryContext';
|
||||
import { useRSForm } from '../../context/RSFormContext';
|
||||
import { useConceptTheme } from '../../context/ThemeContext';
|
||||
|
|
Loading…
Reference in New Issue
Block a user