mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
Добавили заметки в сайдбар (#126)
* added notes sidebar * added note dropping and editing * added sidebar navigation * handling sidebarchanges over time * using router back for closing sidebar * fixed tripping inside single sidebar * added superpowers toggle to sidebar * user button opens sidebar now * added profile cover for profile sidebar * removed profile sidebar completely * ran prettier over project * added note not found error literal
This commit is contained in:
parent
fe3db608d6
commit
5d34090238
72 changed files with 1241 additions and 664 deletions
22
src/containers/auth/SuperPowersToggle/index.tsx
Normal file
22
src/containers/auth/SuperPowersToggle/index.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { FC } from 'react';
|
||||
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
||||
import { BorisSuperpowers } from '~/components/boris/BorisSuperpowers';
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
import { useSuperPowers } from '~/hooks/auth/useSuperPowers';
|
||||
|
||||
interface SuperPowersToggleProps {}
|
||||
|
||||
const SuperPowersToggle: FC<SuperPowersToggleProps> = observer(() => {
|
||||
const { isUser } = useAuth();
|
||||
const { isTester, setIsTester } = useSuperPowers();
|
||||
|
||||
if (!isUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <BorisSuperpowers active={isTester} onChange={setIsTester} />;
|
||||
});
|
||||
|
||||
export { SuperPowersToggle };
|
Loading…
Add table
Add a link
Reference in a new issue