diff --git a/packages/w3ui/examples/react/w3console/src/app.tsx b/packages/w3ui/examples/react/w3console/src/app.tsx index 52b2058e0..71fca1ea8 100644 --- a/packages/w3ui/examples/react/w3console/src/app.tsx +++ b/packages/w3ui/examples/react/w3console/src/app.tsx @@ -1,6 +1,6 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; -import { Authenticator } from './components/Authenticator' +import { Authenticator } from '@w3ui/react-keyring' import { W3APIProvider } from './components/W3API' // thanks, https://dev.to/franciscomendes10866/file-based-routing-using-vite-and-react-router-3fdo diff --git a/packages/w3ui/examples/react/w3console/src/components/Authenticator.tsx b/packages/w3ui/examples/react/w3console/src/components/Authenticator.tsx index 94b23f01c..bb745ec26 100644 --- a/packages/w3ui/examples/react/w3console/src/components/Authenticator.tsx +++ b/packages/w3ui/examples/react/w3console/src/components/Authenticator.tsx @@ -60,31 +60,4 @@ export function AuthenticationEnsurer ({ return } -interface AuthenticatorProps { - children: JSX.Element | JSX.Element[] - className?: string -} - -export function Authenticator ({ - children, - className = '' -}: AuthenticatorProps): JSX.Element { - return ( - - {children} - - ) -} -/** - * Wrapping a component with this HoC ensures an identity exists. - */ -export function withIdentity, P> ( - Component: C -) { - return (props: any) => ( - - - - ) -} diff --git a/packages/w3ui/examples/react/w3console/src/pages/index.tsx b/packages/w3ui/examples/react/w3console/src/pages/index.tsx index ec62fbd9e..e0725de8a 100644 --- a/packages/w3ui/examples/react/w3console/src/pages/index.tsx +++ b/packages/w3ui/examples/react/w3console/src/pages/index.tsx @@ -13,6 +13,7 @@ import { Uploader } from '../components/Uploader' import { UploadsList } from '../components/UploadsList' import { SpaceFinder } from '../components/SpaceFinder' import { SpaceCreatorForm, SpaceCreator } from '../components/SpaceCreator' +import { AuthenticationEnsurer } from '../components/Authenticator' function SpaceRegistrar (): JSX.Element { const [, { registerSpace }] = useKeyring() @@ -227,28 +228,30 @@ export default function Home (): JSX.Element { } return ( - -
- -
- -
-
-
+ +
+ +
+ + + ) }