Skip to content

Commit 65d5098

Browse files
committed
feat: Refactor context usage and update dependencies across app-shell and plugin-designer
1 parent c051a9e commit 65d5098

12 files changed

Lines changed: 121 additions & 288 deletions

File tree

packages/app-shell/package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@
6262
"react-router-dom": "^6.0.0 || ^7.0.0"
6363
},
6464
"devDependencies": {
65-
"@object-ui/plugin-calendar": "workspace:*",
66-
"@object-ui/plugin-charts": "workspace:*",
67-
"@object-ui/plugin-chatbot": "workspace:*",
68-
"@object-ui/plugin-dashboard": "workspace:*",
69-
"@object-ui/plugin-designer": "workspace:*",
70-
"@object-ui/plugin-detail": "workspace:*",
71-
"@object-ui/plugin-form": "workspace:*",
72-
"@object-ui/plugin-grid": "workspace:*",
73-
"@object-ui/plugin-kanban": "workspace:*",
74-
"@object-ui/plugin-list": "workspace:*",
75-
"@object-ui/plugin-report": "workspace:*",
76-
"@object-ui/plugin-view": "workspace:*",
7765
"@types/node": "^25.6.0",
7866
"@types/react": "19.2.14",
7967
"@types/react-dom": "19.2.3",

packages/app-shell/src/providers/AdapterProvider.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,12 @@
77
* @module
88
*/
99

10-
import { createContext, useContext, useState, useEffect, type ReactNode } from 'react';
10+
import { useState, useEffect, type ReactNode } from 'react';
1111
import { ObjectStackAdapter } from '@object-ui/data-objectstack';
1212
import { createAuthenticatedFetch } from '@object-ui/auth';
13+
import { AdapterCtx } from '@object-ui/react';
1314

14-
const AdapterCtx = createContext<ObjectStackAdapter | null>(null);
15-
16-
/**
17-
* Hook to access the ObjectStackAdapter from context.
18-
*/
19-
export function useAdapter(): ObjectStackAdapter | null {
20-
return useContext(AdapterCtx);
21-
}
15+
export { useAdapter } from '@object-ui/react';
2216

2317
interface AdapterProviderProps {
2418
children: ReactNode;

0 commit comments

Comments
 (0)