mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added superpowers toggle to sidebar
This commit is contained in:
parent
32aaa1e8db
commit
d652a76640
25 changed files with 400 additions and 283 deletions
|
@ -1,15 +1,17 @@
|
|||
import React, { FC } from 'react';
|
||||
import React, { FC } from "react";
|
||||
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
import { observer } from "mobx-react-lite";
|
||||
|
||||
import { useAuth } from "~/hooks/auth/useAuth";
|
||||
|
||||
interface IProps {}
|
||||
|
||||
const Superpower: FC<IProps> = ({ children }) => {
|
||||
const Superpower: FC<IProps> = observer(({ children }) => {
|
||||
const { isTester } = useAuth();
|
||||
|
||||
if (!isTester) return null;
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
});
|
||||
|
||||
export { Superpower };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue