mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
refactor boris components
This commit is contained in:
parent
8ec77986bf
commit
c53ac831e7
30 changed files with 42 additions and 114 deletions
17
src/components/common/Superpower/index.tsx
Normal file
17
src/components/common/Superpower/index.tsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
import React, { FC } from 'react';
|
||||
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
|
||||
interface IProps {}
|
||||
|
||||
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