From 1d38d8e8c76b314a01de15cdeb45c6ced8487fd6 Mon Sep 17 00:00:00 2001
From: Luke Cha <104121286+sf-luke-cha@users.noreply.github.com>
Date: Fri, 21 Jul 2023 18:05:50 +0900
Subject: [PATCH] Fix build script to exclude when build and set text align
---
package.json | 5 +++--
src/components/BotMessageWithBodyInput.tsx | 9 ++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/package.json b/package.json
index dca6532b2..c951410c4 100644
--- a/package.json
+++ b/package.json
@@ -15,8 +15,9 @@
"scripts": {
"dev": "vite",
"build:types": "rm -rf dist; rm -rf icons; rm -rf icons; tsc; cp -R src/icons icons; cp -R src/icons dist/icons ; cp -R src/css css; cp -R src/css dist/css",
- "prebuild": "rm -rf ./dist",
- "build": "npm run prebuild && tsc-silent -p './tsconfig.json' --suppress @ && vite build",
+ "prebuild": "rm -rf ./dist && mv .env .env_temp || true",
+ "postbuild": "mv .env_temp .env || true",
+ "build": "npm run prebuild && tsc-silent -p './tsconfig.json' --suppress @ && vite build && npm run postbuild",
"build:pages": "npm run prebuild && tsc-silent -p './tsconfig.json' --suppress @ && vite build --config vite.config.pages.ts",
"lint": "npx eslint src",
"lint:fix": "npm run lint -- --fix",
diff --git a/src/components/BotMessageWithBodyInput.tsx b/src/components/BotMessageWithBodyInput.tsx
index e58692526..a37e138c0 100644
--- a/src/components/BotMessageWithBodyInput.tsx
+++ b/src/components/BotMessageWithBodyInput.tsx
@@ -81,7 +81,14 @@ export default function BotMessageWithBodyInput(props: Props) {
/>
- {botUser.nickname}
+
+ {botUser.nickname}
+
{bodyComponent}
{formatCreatedAtToAMPM(message.createdAt)}