This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/test by this push:
     new fe12e11b fix: Adjustment of the toast component's position from the top
fe12e11b is described below

commit fe12e11b62d1080d01f9976c7afe13b654aff5fa
Author: shuai <[email protected]>
AuthorDate: Mon Mar 17 10:21:56 2025 +0800

    fix: Adjustment of the toast component's position from the top
---
 ui/src/hooks/useExternalToast/index.tsx | 4 ++--
 ui/src/hooks/useToast/index.tsx         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ui/src/hooks/useExternalToast/index.tsx 
b/ui/src/hooks/useExternalToast/index.tsx
index 9bbc5883..b6f077a6 100644
--- a/ui/src/hooks/useExternalToast/index.tsx
+++ b/ui/src/hooks/useExternalToast/index.tsx
@@ -28,7 +28,7 @@ import { Storage } from '@/utils';
 
 const toastPortal = document.createElement('div');
 toastPortal.style.position = 'fixed';
-toastPortal.style.top = '90px';
+toastPortal.style.top = '78px';
 toastPortal.style.left = '50%';
 toastPortal.style.transform = 'translate(-50%, 0)';
 toastPortal.style.maxWidth = '100%';
@@ -37,7 +37,7 @@ toastPortal.style.zIndex = '1001';
 const setPortalPosition = () => {
   const header = document.querySelector('#header');
   if (header) {
-    toastPortal.style.top = `${header.getBoundingClientRect().top + 90}px`;
+    toastPortal.style.top = `${header.getBoundingClientRect().top + 78}px`;
   }
 };
 const startHandlePortalPosition = () => {
diff --git a/ui/src/hooks/useToast/index.tsx b/ui/src/hooks/useToast/index.tsx
index ae91a444..1aaff47a 100644
--- a/ui/src/hooks/useToast/index.tsx
+++ b/ui/src/hooks/useToast/index.tsx
@@ -24,7 +24,7 @@ import ReactDOM from 'react-dom/client';
 
 const toastPortal = document.createElement('div');
 toastPortal.style.position = 'fixed';
-toastPortal.style.top = '90px';
+toastPortal.style.top = '78px';
 toastPortal.style.left = '50%';
 toastPortal.style.transform = 'translate(-50%, 0)';
 toastPortal.style.maxWidth = '100%';
@@ -33,7 +33,7 @@ toastPortal.style.zIndex = '1001';
 const setPortalPosition = () => {
   const header = document.querySelector('#header');
   if (header) {
-    toastPortal.style.top = `${header.getBoundingClientRect().top + 90}px`;
+    toastPortal.style.top = `${header.getBoundingClientRect().top + 78}px`;
   }
 };
 const startHandlePortalPosition = () => {

Reply via email to