diff --git a/frontend/components/account/Profile.tsx b/frontend/components/account/Profile.tsx
index b17c4c1f17..ce3574deac 100644
--- a/frontend/components/account/Profile.tsx
+++ b/frontend/components/account/Profile.tsx
@@ -107,7 +107,7 @@ function Profile() {
dialogOpen={isDialogOpen}
onDialogOpenChange={manageDialog} // Allow toggling the dialog
text="Update Profile"
- className="w-fit bg-btn text-white text-sm py-2 px-4 rounded-md hover:bg-purple-700"
+ className="w-fit bg-btn text-white text-sm py-2 px-4 rounded-md"
type="button"
variant="primary"
description="Are you sure you want to update your profile?"
diff --git a/frontend/components/account/Settings.tsx b/frontend/components/account/Settings.tsx
index c327bd4605..5113800068 100644
--- a/frontend/components/account/Settings.tsx
+++ b/frontend/components/account/Settings.tsx
@@ -120,7 +120,7 @@ function Setting() {
dialogOpen={isUpdateDialogOpen}
onDialogOpenChange={manageUpdateDialog}
text="Update Settings"
- className="w-fit bg-btn text-white text-sm py-2 px-4 rounded-md hover:bg-theme-700"
+ className="w-fit bg-btn text-white text-sm py-2 px-4 rounded-md"
type="button"
variant="primary"
description="Are you sure you want to update your settings?"
diff --git a/frontend/components/customs/custom-dialog.tsx b/frontend/components/customs/custom-dialog.tsx
index 047558b707..be81151dfd 100644
--- a/frontend/components/customs/custom-dialog.tsx
+++ b/frontend/components/customs/custom-dialog.tsx
@@ -56,7 +56,7 @@ function CustomDialogWithButton(props: CustomDialogProps) {
- Warning
+ {props.text || 'Warning'}
diff --git a/frontend/components/customs/datatable.tsx b/frontend/components/customs/datatable.tsx
index c7dec5ab39..8c4d3a7c5e 100644
--- a/frontend/components/customs/datatable.tsx
+++ b/frontend/components/customs/datatable.tsx
@@ -65,7 +65,7 @@ export default function Datatable({
- {hideIdx ? null : 'No.'}
+ {hideIdx ? null : 'No.'}
{columns.map((elem) => {
if (elem.isHidden) {
return null
@@ -129,21 +129,22 @@ export default function Datatable({
)}
- {col.customAction && col.customAction.formatter ? (
- col.customAction.formatter(elem, router)
- ) : (
-
- )}
+ {col.customAction &&
+ (col.customAction.formatter ? (
+ col.customAction.formatter(elem, router)
+ ) : (
+
+ ))}
)
}
diff --git a/frontend/components/dashboard/new-session.tsx b/frontend/components/dashboard/new-session.tsx
index 15b8b6f580..890ce3b82c 100644
--- a/frontend/components/dashboard/new-session.tsx
+++ b/frontend/components/dashboard/new-session.tsx
@@ -14,6 +14,7 @@ import { addUserToMatchmaking } from '../../services/matching-service-api'
import CustomModal from '../customs/custom-modal'
import Loading from '../customs/loading'
import { capitalizeFirstLowerRest } from '@/util/string-modification'
+import { encodeStr } from '@/util/encryption'
export const NewSession = () => {
const router = useRouter()
@@ -109,7 +110,8 @@ export const NewSession = () => {
switch (newMessage.type) {
case WebSocketMessageType.SUCCESS:
updateMatchmakingStatus(MatchingStatus.MATCH_FOUND, newMessage.matchId)
- router.push(`/code/${newMessage.matchId}`)
+ const encodedId = encodeStr(newMessage.matchId)
+ router.push(`/code/${encodedId}`)
break
case WebSocketMessageType.FAILURE:
socketRef.current?.close()
@@ -204,7 +206,7 @@ export const NewSession = () => {
-