From 12da318a2489221060ef40882d8926268f38852d Mon Sep 17 00:00:00 2001 From: yude Date: Tue, 5 Mar 2024 09:53:22 +0900 Subject: [PATCH] Fix text rendering on NOT dark mode --- src/components/Chat.tsx | 24 ++++++++++++------------ src/components/HorizontalMenu.tsx | 20 +++++++++----------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 1eea873..14fea2f 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -77,7 +77,7 @@ export default function Chat() { return ( -
+
@@ -85,31 +85,31 @@ export default function Chat() { {alert}
-
+
- - + +
- - + +
-
+
{ messages && messages.map((message, index) => { return ( -
+

{message.name} さん,{" "} { @@ -117,9 +117,9 @@ export default function Chat() { }

- - {message.body} - + {message.body.includes("$$") ? + {message.body.replace(/\$\$/g, "")} + : <>{message.body}}

) diff --git a/src/components/HorizontalMenu.tsx b/src/components/HorizontalMenu.tsx index 3cd0e07..11f44fa 100644 --- a/src/components/HorizontalMenu.tsx +++ b/src/components/HorizontalMenu.tsx @@ -1,18 +1,10 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faUser, faStar} from '@fortawesome/free-regular-svg-icons' +import { faUser, faStar, faComments } from '@fortawesome/free-regular-svg-icons' import { faLink, faKey } from '@fortawesome/free-solid-svg-icons' +import { Pages } from "./VerticalMenu" import { RecoilRoot, atom, useRecoilState } from 'recoil' -export enum Pages { - Profile = 0, - Links = 1, - Keys = 2, - Activities = 3, - Spotify = 4, - Services = 5, - } - export const currentPage = atom({ key: 'page', default: Pages.Profile, @@ -23,7 +15,7 @@ export default function HorizontalMenu() { return ( -
+
{setPage(Pages.Profile)}} @@ -48,6 +40,12 @@ export default function HorizontalMenu() { > {" "}
+
{setPage(Pages.Chat)}} + > + {" "} +
)