22301014 | b1477f7 | 2025-06-07 22:54:40 +0800 | [diff] [blame^] | 1 | import React from 'react'; |
2 | import ProtectedRoute from './ProtectedRoute'; | ||||
3 | |||||
4 | const withProtect = (Component: React.ComponentType) => { | ||||
5 | return React.createElement(ProtectedRoute, { | ||||
6 | children: React.createElement(Component) | ||||
7 | }); | ||||
8 | }; | ||||
9 | |||||
10 | export default withProtect; |