mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
399 B
TypeScript
12 lines
399 B
TypeScript
import React, { Fragment, PropsWithChildren } from 'react';
|
|
import { isDevelopment } from '../utils/environment';
|
|
|
|
/**
|
|
* 开发中容器
|
|
* 在容器下的组件在生产环境下不会被渲染
|
|
*/
|
|
export const DevContainer: React.FC<PropsWithChildren> = React.memo((props) => {
|
|
return isDevelopment ? <Fragment>{props.children}</Fragment> : null;
|
|
});
|
|
DevContainer.displayName = 'DevContainer';
|