mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui-next: page registration (#1159)
This commit is contained in:
1 parent
66a8a0ab9e
commit
bbd7fbc852
28 files changed
+238
-98
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-next-plugin",
|
||||
"version": "0.0.0",
|
||||
"author": "Baoshuo <i@baoshuo.ren>",
|
||||
"license": "AGPL-3.0",
|
||||
"hydro": {
|
||||
"cli": false
|
||||
},
|
||||
"dependencies": {
|
||||
"@hydrooj/ui-next": "workspace:*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { PluginAPI } from '@hydrooj/ui-next';
|
||||
|
||||
export function setup(api: PluginAPI) {
|
||||
api.before('page:app', () => {
|
||||
console.log('before app');
|
||||
// throw new Error('test error boundary in before interceptor');
|
||||
return <div>before app via @hydrooj/ui-next-plugin-sample</div>;
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user