Skip to content

Commit

Permalink
Add support for "Göteborg" message and update conversation area styles
Browse files Browse the repository at this point in the history
  • Loading branch information
insulationman committed Mar 13, 2024
1 parent 1a47146 commit 85b1bb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ function App() {
if (message.toLowerCase().includes("glenn")) {
return "Ja, det är jag!";
}
if (message.toLowerCase().includes("göteborg")) {
return "Göteborg är bäst!";
}
if (message.toLowerCase().includes("vem")) {
return "Janne på varvet!";
}
Expand All @@ -46,16 +49,13 @@ function App() {
const createDefaultResponse = () => {
//randomize
const random = Math.floor(Math.random() * 10);
if (random < 9) {
return "GAIS";
if (random < 3) {
return "IFK är bäst!";
}
if (random < 6) {
return "ÖIS";
}
if (random < 3) {
return "IFK";
return "Nu ska jag läsa GP!";
}
return "BK Häcken";
return "Du är så snabb på tangentbordet!";
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/ConversationArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ConversationArea = (props: ConversationAreaProps) => {
const { messages } = props;

return (
<div className="w-full flex flex-col-reverse overflow-x-scroll p-4">
<div className="w-full flex flex-col-reverse overflow-x-auto p-4">
<div className="flex w-full justify-center">
<div className="w-[50rem] shrink">
{messages.map((message, index) => (
Expand Down

0 comments on commit 85b1bb6

Please sign in to comment.