Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Home 3.2 #5

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
956 changes: 773 additions & 183 deletions browser-platform-home-react-wsp/package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions browser-platform-home-react-wsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"dependencies": {
"@auth0/auth0-react": "^2.1.0",
"@interopio/browser-platform": "~3.1.2",
"@interopio/browser-worker": "~3.1.0",
"@interopio/home-ui-react": "~1.1.1",
"@interopio/react-hooks": "~3.1.2",
"@interopio/workspaces-api": "~3.1.0",
"@interopio/workspaces-ui-react": "~3.1.2",
"@interopio/browser-platform": "^3.2.0",
"@interopio/browser-worker": "^3.2.0",
"@interopio/home-ui-react": "^1.2.1",
"@interopio/react-hooks": "^3.2.0",
"@interopio/workspaces-api": "^3.2.0",
"@interopio/workspaces-ui-react": "^3.2.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
35 changes: 0 additions & 35 deletions browser-platform-home-react-wsp/src/app/app.tsx

This file was deleted.

1 change: 0 additions & 1 deletion browser-platform-home-react-wsp/src/app/index.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions browser-platform-home-react-wsp/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import ReactDOM from 'react-dom/client';
import reportWebVitals from './reportWebVitals';
import { Main } from "./main";
import { Auth0Main } from "./main";

import './index.css';
import "@interopio/home-ui-react/index.css";
import "@interopio/workspaces-ui-react/dist/styles/workspaces.css";

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);

root.render(
<Main />
<Auth0Main />
);

// If you want to start measuring performance in your app, pass a function
Expand Down
1 change: 0 additions & 1 deletion browser-platform-home-react-wsp/src/login/index.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions browser-platform-home-react-wsp/src/login/login-page.tsx

This file was deleted.

37 changes: 21 additions & 16 deletions browser-platform-home-react-wsp/src/main/auth0-main.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import { Auth0Provider } from "@auth0/auth0-react";
import { IOConnectHomeProvider } from "@interopio/home-ui-react";
import { App } from "../app";
import { IOConnectHome, IOConnectHomeConfig } from "@interopio/home-ui-react";
import { getIoConfig } from "../common/getIoConfig";
import { useMemo } from "react";

export const Main = () => {
return (
<Auth0Provider
domain={process.env.REACT_APP_AUTH_DOMAIN as string}
clientId={process.env.REACT_APP_AUTH_CLIENT_ID as string}
authorizationParams={{
redirect_uri: process.env.REACT_APP_AUTH_REDIRECT_URL,
}}
>
<IOConnectHomeProvider>
<App />
</IOConnectHomeProvider>
</Auth0Provider>
export const Auth0Main = () => {
const ioConnectHomeConfig: IOConnectHomeConfig = useMemo(
() => ({
ioConnectConfig: getIoConfig(),
login: {
type: 'auth0',
providerOptions: {
domain: process.env.REACT_APP_AUTH_DOMAIN as string,
clientId: process.env.REACT_APP_AUTH_CLIENT_ID as string,
authorizationParams: {
redirect_uri: process.env.REACT_APP_AUTH_REDIRECT_URL,
},
},
}
}),
[]
);

return <IOConnectHome config={ioConnectHomeConfig} />;
};
1 change: 1 addition & 0 deletions browser-platform-home-react-wsp/src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./auth0-main";
export * from "./no-auth-main";
14 changes: 14 additions & 0 deletions browser-platform-home-react-wsp/src/main/no-auth-main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { IOConnectHome, IOConnectHomeConfig } from "@interopio/home-ui-react";
import { getIoConfig } from "../common/getIoConfig";
import { useMemo } from "react";

export const NoAuthMain = () => {
const ioConnectHomeConfig: IOConnectHomeConfig = useMemo(
() => ({
ioConnectConfig: getIoConfig(),
}),
[]
);

return <IOConnectHome config={ioConnectHomeConfig} />;
};

This file was deleted.

This file was deleted.

Loading