mirror of https://github.com/msgbyte/tailchat
feat: add device version display in settings
only run in plugin com.msgbyte.env.rnpull/90/head
parent
f7658bd692
commit
11827f7a4c
@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import { Translate } from './translate';
|
||||
|
||||
interface WindowRnDeviceInfo {
|
||||
version: string;
|
||||
readableVersion: string;
|
||||
}
|
||||
|
||||
export const DeviceInfoPanel: React.FC = React.memo(() => {
|
||||
const deviceInfo: WindowRnDeviceInfo = (window as any).__rnDeviceInfo ?? {};
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
{Translate.clientVersion}: {deviceInfo.version}(
|
||||
{deviceInfo.readableVersion})
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
DeviceInfoPanel.displayName = 'DeviceInfoPanel';
|
Loading…
Reference in New Issue