Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy committed Jun 16, 2024
1 parent 7df3829 commit 9fca0d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/components/i18n/LanguageMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ const LanguageMenu: React.FC<LanguageMenuProps> = (props) => {
</div>
<ul
tabIndex={0}
className="menu dropdown-content z-[2] w-36 rounded-box bg-base-100 p-2 shadow-2xl"
className="menu dropdown-content z-[2] w-40 rounded border border-base-content/10 bg-base-100 p-2 shadow-2xl"
>
{LANGUAGE_SELECTIONS.map((item, index) => (
<li key={index}>
<span
className="rounded"
onClick={() => {
changeLanguage(item.value);
setOpen(false);
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const UserMenu: React.FC<UserMenuProps> = (props) => {
</div>
<ul
tabIndex={0}
className="menu dropdown-content z-[2] w-32 rounded border border-base-200 bg-base-100 shadow-2xl"
className="menu dropdown-content z-[2] w-32 rounded border border-base-content/10 bg-base-100 shadow-2xl"
>
{isLogined && (
<li key="logout">
Expand All @@ -76,7 +76,7 @@ const UserMenu: React.FC<UserMenuProps> = (props) => {
onClick={(e) => {
e.preventDefault();
removeCookie("auth-token");
window.location.reload();
window.location.href = import.meta.env.BASE_URL;
}}
>
Logout
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const Login: React.FC = () => {
onClick={() => {
postLogin(account, password).then((res) => {
console.log(res);
window.location.href = "/";
window.location.href = import.meta.env.BASE_URL;
});
}}
>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/admin-dashboard/CreateProblem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const CreateProblem: React.FC = () => {

return (
<>
<div className="flex w-full justify-between px-4">
<div className="flex w-full justify-between">
<h1 className="text-3xl font-bold">{t("Create Problem")}</h1>
<div className="flex gap-4">
<div className="flex gap-4 px-2">
<button
className="btn btn-error btn-sm text-base-100"
aria-label="Delete"
Expand All @@ -84,13 +84,13 @@ const CreateProblem: React.FC = () => {
</button>
</div>
</div>
<div className="w-full px-4 pt-2">
<div className="w-full pt-2">
<p className="">
{t("Please fill in the information below to create a new problem.")}
</p>
<p className="">{t("The information marked with * is required.")}</p>
</div>
<div className="card mt-4 w-full border border-base-300 pt-4 shadow-xl">
<div className="card mt-4 w-full rounded border border-base-content/10 bg-base-100 pt-4 shadow-xl">
<div className="card-body -mt-6">
<div className="flex items-center gap-4">
<label className="form-control w-full max-w-xs">
Expand Down

0 comments on commit 9fca0d6

Please sign in to comment.