generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating conversationId and other cleanup
- Loading branch information
jabrock
committed
Aug 14, 2024
1 parent
bb8237c
commit 4e4f23d
Showing
5 changed files
with
52 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import { Header } from "./header"; | ||
import Content from "./content/index"; | ||
import { registerCustomElement } from "ojs/ojvcomponent"; | ||
import "preact"; | ||
import { createContext } from "preact"; | ||
|
||
type Props = { | ||
appName: string; | ||
}; | ||
const convoUUID = window.crypto.randomUUID(); | ||
export const ConvoCtx = createContext(convoUUID); | ||
|
||
export const App = registerCustomElement("app-root", (props: Props) => { | ||
props.appName = "Generative AI JET UI"; | ||
|
||
return ( | ||
<div id="appContainer" class="oj-web-applayout-page"> | ||
<Header appName={props.appName} /> | ||
<Content /> | ||
<ConvoCtx.Provider value={convoUUID}> | ||
{console.log("UUID: ", convoUUID)} | ||
<Header appName={props.appName} /> | ||
<Content /> | ||
</ConvoCtx.Provider> | ||
</div> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters