Skip to content

Commit 15fce7d

Browse files
committed
♻️ Fix Notification in interface
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
1 parent aa2f380 commit 15fce7d

File tree

6 files changed

+81
-79
lines changed

6 files changed

+81
-79
lines changed

interface/next.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const nextConfig =
3333
distDir: "dist",
3434
};
3535

36-
export default nextConfig
36+
export default nextConfig;

interface/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"dev": "npx next dev",
2525
"build": "npx next build",
2626
"start": "pnpm build && npx next start",
27-
"prettier:check": "npx prettier -c \"**/*.{js,ts,tsx,css,md,json,yml,yaml}\"",
28-
"prettier:fix": "npx prettier -w \"**/*.{js,ts,tsx,css,md,json,yml,yaml}\"",
27+
"prettier:check": "npx prettier -c \"**/*.{js,mjs,ts,tsx,css,md,json,yml,yaml}\"",
28+
"prettier:fix": "npx prettier -w \"**/*.{js,mjs,ts,tsx,css,md,json,yml,yaml}\"",
2929
"lint:check": "pnpm prettier:check && npx eslint .",
3030
"lint:fix": "pnpm prettier:fix && npx eslint . --fix"
3131
},
@@ -58,6 +58,6 @@
5858
"prettier-plugin-tailwindcss": "^0.6.11",
5959
"tailwindcss": "^4.0.0",
6060
"typescript": "^5.7.3",
61-
"typescript-eslint": "^8.21.0"
61+
"typescript-eslint": "^8.22.0"
6262
}
6363
}

interface/src/components/ui/Notification.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ export const Notification = ({
5252
{/* Global notification live region, render this permanently at the end of the document */}
5353
<div
5454
aria-live="assertive"
55-
className="pointer-events-none fixed inset-0 flex items-end px-4 py-6 sm:items-start sm:p-6"
55+
className="pointer-events-none fixed top-0 right-0 z-50 flex translate-x-[2px] items-end px-4 py-6 sm:items-start sm:p-6"
5656
>
57-
<div className="flex w-full flex-col items-center space-y-4 sm:items-end">
57+
<div className="flex w-full flex-col items-start space-y-4 sm:items-end">
5858
{/* Notification panel, dynamically insert this into the live region when it needs to be displayed */}
5959
<Transition
6060
show={show}
@@ -66,28 +66,30 @@ export const Notification = ({
6666
leaveTo="opacity-0"
6767
>
6868
<div
69-
className={`ring-opacity-5 pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg ring-1 shadow-lg ring-black ${bgColor}`}
69+
className={`pointer-events-auto w-full max-w-4xl overflow-hidden rounded-lg ring-1 shadow-md ring-gray-300 dark:ring-gray-600 ${bgColor}`}
7070
>
71-
<div className="p-4">
71+
<div className="px-8 py-4">
7272
<div className="flex items-start">
7373
<div className="shrink-0">
7474
<Icon
7575
className={`h-6 w-6 ${iconColor}`}
7676
aria-hidden="true"
7777
/>
7878
</div>
79-
<div className="ml-3 w-0 flex-1 pt-0.5">
79+
<div className="ml-2 flex-1 pr-14">
8080
<p className={`text-sm font-medium ${titleTextColor}`}>
8181
{title}
8282
</p>
83-
<p className={`mt-1 text-sm ${descriptionTextColor}`}>
84-
{description}
85-
</p>
83+
{description && (
84+
<p className={`mt-1 text-sm ${descriptionTextColor}`}>
85+
{description}
86+
</p>
87+
)}
8688
</div>
8789
<div className="ml-4 flex shrink-0">
8890
<button
8991
type="button"
90-
className={`inline-flex rounded-md ${bgColor} ${titleTextColor} text-hover focus:outline-hidden`}
92+
className={`inline-flex rounded-md ${bgColor} ${titleTextColor} text-hover focus:outline-none`}
9193
onClick={() => {
9294
setShow(false);
9395
}}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@
175175
"deploy:soneiummain": "npx hardhat run --no-compile --network soneiumMain scripts/deploy.ts",
176176
"deploy:swelltestnet": "npx hardhat run --no-compile --network swellTestnet scripts/deploy.ts",
177177
"deploy:swellmain": "npx hardhat run --no-compile --network swellMain scripts/deploy.ts",
178-
"prettier:check": "npx prettier -c \"**/*.{js,mjs,ts,md,sol,json,yml,yaml}\"",
178+
"prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
179179
"prettier:check:interface": "pnpm -C interface prettier:check",
180-
"prettier:fix": "npx prettier -w \"**/*.{js,mjs,ts,md,sol,json,yml,yaml}\"",
180+
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
181181
"prettier:fix:interface": "pnpm -C interface prettier:fix",
182182
"solhint:check": "npx solhint -c src/.solhint.json \"src/**/*.sol\" && npx solhint -c test/.solhint-tests.json \"test/**/*.sol\"",
183183
"solhint:fix": "npx solhint -c src/.solhint.json \"src/**/*.sol\" --fix && npx solhint -c test/.solhint-tests.json \"test/**/*.sol\" --fix",
@@ -208,6 +208,6 @@
208208
"ts-node": "^10.9.2",
209209
"typechain": "^8.3.2",
210210
"typescript": "^5.7.3",
211-
"typescript-eslint": "^8.21.0"
211+
"typescript-eslint": "^8.22.0"
212212
}
213213
}

pnpm-lock.yaml

Lines changed: 62 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)