mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Start cleaning up the mess of useServer; make startup page update in real time
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import React from 'react';
|
||||
import Can from '@/components/elements/Can';
|
||||
import ScreenBlock from '@/components/screens/ScreenBlock';
|
||||
import isEqual from 'react-fast-compare';
|
||||
|
||||
const requireServerPermission = (Component: React.ComponentType<any>, permissions: string | string[]) => {
|
||||
return class extends React.Component<any, any> {
|
||||
shouldComponentUpdate (nextProps: Readonly<any>) {
|
||||
return !isEqual(nextProps, this.props);
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<Can
|
||||
|
||||
Reference in New Issue
Block a user