Skip to content

Commit

Permalink
Merge pull request #45 from Azure-Samples/gk/41-personalize-on-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
thegovind committed May 4, 2023
2 parents 196a8ff + 5255dd0 commit 7f43074
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Binary file modified ancillary/images/wip-azure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions services/frontend/src/data/personalize/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {TopInvestmentsData} from "@/data/static/top-investments-data";
import {AdvisorsList, RiskLevelsList, SubredditsList} from "@/data/static/personalize";
import {UserInfo} from "@/data/static/user-info";
import {AssetsData} from "@/data/static/assetsData";
import {Chats} from "@/data/static/chats";

export const userInfoAtom = atom(UserInfo);

Expand All @@ -18,4 +19,6 @@ export const selectedSubRedditAtom = atom(SubredditsList[getRandomIndex(Subreddi

export const selectedRiskLevelAtom = atom(RiskLevelsList[getRandomIndex(RiskLevelsList.length)]);

export const chatsAtom = atom(Chats);


5 changes: 4 additions & 1 deletion services/frontend/src/layouts/sidebar/chat-blade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import Scrollbar from '@/components/ui/scrollbar';
import Input from "@/components/ui/forms/input";
import {Chats} from "@/data/static/chats";
import ChatMessage from "@/components/chat/chat-message";
import {useAtom} from "jotai";
import {chatsAtom, selectedAdvisorAtom} from "@/data/personalize/store";

export default function Sidebar({ className }: { className?: string }) {
const [chats, setChatsAtom] = useAtom(chatsAtom);
return (
<aside
className={cn(
Expand All @@ -19,7 +22,7 @@ export default function Sidebar({ className }: { className?: string }) {
<div className="flex-1 p:2 sm:p-6 justify-between flex flex-col h-screen">
<div id="messages"
className="flex flex-col space-y-4 p-3 overflow-y-auto scrollbar-thumb-blue scrollbar-thumb-rounded scrollbar-track-blue-lighter scrollbar-w-2 scrolling-touch">
{Chats?.map((chat) => (
{chats?.map((chat) => (
<ChatMessage chat={chat} key={chat?.id} />
))}
</div>
Expand Down
4 changes: 2 additions & 2 deletions services/recommendation-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ COPY ./*.csproj .
RUN dotnet restore --use-current-runtime --configfile nuget.config

# copy everything else and build app
COPY ./ .
COPY ./ ./
RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o /app


# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build /app .
COPY --from=build /app ./app
ENTRYPOINT ["dotnet", "GBB.Miyagi.RecommendationService.dll"]

0 comments on commit 7f43074

Please sign in to comment.