Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
d6b431b0
Commit
d6b431b0
authored
Aug 25, 2021
by
filip mertens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm comments
parent
bee4590e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
39 deletions
+0
-39
rootView.tsx
libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx
+0
-1
useLocalStorage.ts
...ui/plugin-manager/src/lib/custom-hooks/useLocalStorage.ts
+0
-37
remix-ui-plugin-manager.tsx
...mix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx
+0
-1
No files found.
libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx
View file @
d6b431b0
...
@@ -33,7 +33,6 @@ function RootView ({ pluginComponent, pluginManagerSettings, children }: RootVie
...
@@ -33,7 +33,6 @@ function RootView ({ pluginComponent, pluginManagerSettings, children }: RootVie
useEffect
(()
=>
{
useEffect
(()
=>
{
pluginComponent
.
getAndFilterPlugins
(
filterPlugins
)
pluginComponent
.
getAndFilterPlugins
(
filterPlugins
)
},
[
filterPlugins
])
},
[
filterPlugins
])
// console.log('This is the state of pluginSettings instance passed from pluginmanager', pluginComponent.pluginSettings)
return
(
return
(
<
Fragment
>
<
Fragment
>
<
div
id=
"pluginManager"
data
-
id=
"pluginManagerComponentPluginManager"
>
<
div
id=
"pluginManager"
data
-
id=
"pluginManagerComponentPluginManager"
>
...
...
libs/remix-ui/plugin-manager/src/lib/custom-hooks/useLocalStorage.ts
View file @
d6b431b0
// import { useState } from 'react'
// // Hook
// export const useLocalStorage = (key: string, initialValue: any) => {
// // State to store our value
// // Pass initial state function to useState so logic is only executed once
// const [storedValue, setStoredValue] = useState<any>(() => {
// try {
// // Get from local storage by key
// const item = window.localStorage.getItem(key)
// // Parse stored json or if none return initialValue
// return item ? JSON.parse(item) : initialValue
// } catch (error) {
// // If error also return initialValue
// console.log(error)
// return initialValue
// }
// })
// // Return a wrapped version of useState's setter function that ...
// // ... persists the new value to localStorage.
// const setValue = (value: any | ((val: any) => any)) => {
// try {
// // Allow value to be a function so we have same API as useState
// const valueToStore =
// value instanceof Function ? value(storedValue) : value
// // Save state
// setStoredValue(valueToStore)
// // Save to local storage
// window.localStorage.setItem(key, JSON.stringify(valueToStore))
// } catch (error) {
// // A more advanced implementation would handle the error case
// console.log(error)
// }
// }
// return [storedValue, setValue] as const
// }
import
{
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
import
{
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
type
SetValue
<
T
>
=
Dispatch
<
SetStateAction
<
T
>>
type
SetValue
<
T
>
=
Dispatch
<
SetStateAction
<
T
>>
...
...
libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx
View file @
d6b431b0
...
@@ -10,7 +10,6 @@ import './remix-ui-plugin-manager.css'
...
@@ -10,7 +10,6 @@ import './remix-ui-plugin-manager.css'
export
const
RemixUiPluginManager
=
({
pluginComponent
,
pluginManagerSettings
}:
RemixUiPluginManagerProps
)
=>
{
export
const
RemixUiPluginManager
=
({
pluginComponent
,
pluginManagerSettings
}:
RemixUiPluginManagerProps
)
=>
{
const
[
activeProfiles
,
setActiveProfiles
]
=
useState
<
Profile
[]
>
(
pluginComponent
.
activePlugins
)
const
[
activeProfiles
,
setActiveProfiles
]
=
useState
<
Profile
[]
>
(
pluginComponent
.
activePlugins
)
const
[
inactiveProfiles
,
setinactiveProfiles
]
=
useState
<
Profile
[]
>
(
pluginComponent
.
inactivePlugins
)
const
[
inactiveProfiles
,
setinactiveProfiles
]
=
useState
<
Profile
[]
>
(
pluginComponent
.
inactivePlugins
)
// console.log('This is the state of pluginSettings at the root of the components', pluginComponent.pluginSettings)
return
(
return
(
<
RootView
pluginComponent=
{
pluginComponent
}
pluginManagerSettings=
{
pluginManagerSettings
}
>
<
RootView
pluginComponent=
{
pluginComponent
}
pluginManagerSettings=
{
pluginManagerSettings
}
>
<
section
data
-
id=
"pluginManagerComponentPluginManagerSection"
>
<
section
data
-
id=
"pluginManagerComponentPluginManagerSection"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment