mirror of
https://github.com/aykhans/slash-e.git
synced 2025-09-09 18:40:44 +00:00
chore: update router config
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import { ReactNode } from "react";
|
||||
|
||||
interface OnlyWhenProps {
|
||||
children: ReactNode;
|
||||
when: boolean;
|
||||
}
|
||||
|
||||
const OnlyWhen: React.FC<OnlyWhenProps> = (props: OnlyWhenProps) => {
|
||||
const { children, when } = props;
|
||||
return when ? <>{children}</> : null;
|
||||
};
|
||||
|
||||
const Only = OnlyWhen;
|
||||
|
||||
export default Only;
|
Reference in New Issue
Block a user