Skip to content

Commit 11abbd8

Browse files
committed
chore/ui: try fix build bug
Signed-off-by: SeeuSim <[email protected]>
1 parent 20e2030 commit 11abbd8

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const AdminEditForm = () => {};

frontend/src/components/blocks/questions/details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const QuestionDetails = ({
2727
{questionDetails.id}.&nbsp;{questionDetails.title}
2828
</CardTitle>
2929
{isAdmin && (
30-
<Button className='flex gap-1 uppercase'>
30+
<Button className='min-h-none ml-8 flex !h-6 gap-1 rounded-md px-2' size='sm'>
3131
<Pencil1Icon />
3232
<span>Edit</span>
3333
</Button>

frontend/vite.config.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ import { defineConfig, loadEnv } from 'vite';
77
export default defineConfig(({ mode }) => {
88
const env = loadEnv(mode, process.cwd());
99
return {
10-
define: {
11-
'process.env.OPENAI_API_KEY': JSON.stringify(env.OPENAI_API_KEY),
12-
},
1310
plugins: [react()],
1411
build: {
1512
outDir: 'build',
@@ -26,39 +23,44 @@ export default defineConfig(({ mode }) => {
2623
proxy: {
2724
'/user-service': {
2825
target: env.VITE_USER_SERVICE,
29-
rewrite: (path: string) => path.replace(/^\/user-service/, ''),
26+
rewrite: (path: string) =>
27+
String(path).replace && String(path).replace(/^\/user-service/, ''),
3028
changeOrigin: true,
3129
cookiePathRewrite: {
3230
'*': '/',
3331
},
3432
},
3533
'/question-service': {
3634
target: env.VITE_QUESTION_SERVICE,
37-
rewrite: (path: string) => path?.replace(/^\/question-service/, ''),
35+
rewrite: (path: string) =>
36+
String(path).replace && String(path).replace(/^\/question-service/, ''),
3837
changeOrigin: true,
3938
cookiePathRewrite: {
4039
'*': '/',
4140
},
4241
},
4342
'/collaboration-service': {
4443
target: env.VITE_COLLAB_SERVICE,
45-
rewrite: (path: string) => path?.replace(/^\/collaboration-service/, ''),
44+
rewrite: (path: string) =>
45+
String(path).replace && String(path).replace(/^\/collaboration-service/, ''),
4646
changeOrigin: true,
4747
cookiePathRewrite: {
4848
'*': '/',
4949
},
5050
},
5151
'/matching-service': {
5252
target: env.VITE_MATCHING_SERVICE,
53-
rewrite: (path: string) => path?.replace(/^\/matching-service/, ''),
53+
rewrite: (path: string) =>
54+
String(path).replace && String(path).replace(/^\/matching-service/, ''),
5455
changeOrigin: true,
5556
cookiePathRewrite: {
5657
'*': '/',
5758
},
5859
},
5960
'/collab-ws': {
6061
target: `${env.VITE_COLLAB_SERVICE.replace('http', 'ws')}`,
61-
rewrite: (path: string) => path?.replace(/\/collab-ws/, ''),
62+
rewrite: (path: string) =>
63+
String(path).replace && String(path).replace(/\/collab-ws/, ''),
6264
ws: true,
6365
},
6466
'/matching-socket/': {

0 commit comments

Comments
 (0)