Skip to content

Commit

Permalink
fix/router-update
Browse files Browse the repository at this point in the history
  • Loading branch information
athul-rs committed Jun 19, 2024
1 parent 6ad5c68 commit f245b98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions frontend/src/routes/Router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ let TrialRoutes;
let RequirePlatformAdmin;
let PlatformAdminPage;
let AppDeployments;
let ChatApp;
let ChatAppPage;
let ChatAppLayout;
try {
TrialRoutes =
require("../plugins/subscription/trial-page/TrialEndPage.jsx").TrialEndPage;
Expand All @@ -43,7 +44,10 @@ try {
require("../plugins/frictionless-onboard/platform-admin-page/PlatformAdminPage.jsx").PlatformAdminPage;
AppDeployments =
require("../plugins/app-deployment/AppDeployments.jsx").AppDeployments;
ChatApp = require("../plugins/app-deployment/ChatApp.jsx").ChatApp;
ChatAppPage =
require("../plugins/app-deployment/chat-app/ChatAppPage.jsx").ChatAppPage;
ChatAppLayout =
require("../plugins/app-deployment/chat-app/ChatAppLayout.jsx").ChatAppLayout;
} catch (err) {
TrialRoutes = NotFound;
}
Expand All @@ -63,6 +67,11 @@ function Router() {
<Route path=":orgName" element={<FullPageLayout />}>
<Route path="onboard" element={<OnBoardPage />} />
</Route>
{ChatAppLayout && ChatAppPage && (
<Route path=":orgName" element={<ChatAppLayout />}>
<Route path="app/:id" element={<ChatAppPage />} />
</Route>
)}
<Route path=":orgName" element={<PageLayout />}>
<Route path="profile" element={<ProfilePage />} />
<Route
Expand All @@ -80,7 +89,6 @@ function Router() {
{AppDeployments && (
<Route path="app" element={<AppDeployments type="app" />} />
)}
{ChatApp && <Route path="app/:id" element={<ChatApp />} />}
<Route path="workflows" element={<WorkflowsPage />} />
<Route path="workflows/:id" element={<ProjectHelper />}>
<Route path="" element={<AgencyPage />} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/chat-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const useChatStore = create((setState, getState) => ({
},
updateChatTranscript: (record) => {
const existingState = { ...getState() };
existingState.chatTranscript = [record, ...existingState.chatTranscript];
existingState.chatTranscript = [...existingState.chatTranscript, record];
setState({ ...existingState });
},
setCurrentContext: (context) => {
Expand Down

0 comments on commit f245b98

Please sign in to comment.