chore: add custom n-progress component to fix unwanted n-progress trigger issues. (#4965)

* chore: add n-progress lib.

* chore: prevent unwanted n-progress from projects and notifications.

* fix: lint errors.
This commit is contained in:
Prateek Shourya 2024-06-28 20:39:19 +05:30 committed by GitHub
parent 209dc57307
commit 626464513d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 463 additions and 12 deletions

View file

@ -100,7 +100,7 @@ export const ProjectCard: React.FC<Props> = observer((props) => {
const handleCopyText = () =>
copyUrlToClipboard(projectLink).then(() =>
setToast({
type: TOAST_TYPE.SUCCESS,
type: TOAST_TYPE.INFO,
title: "Link Copied!",
message: "Project link copied to clipboard.",
})
@ -189,6 +189,7 @@ export const ProjectCard: React.FC<Props> = observer((props) => {
if (!isArchived) setJoinProjectModal(true);
}
}}
data-prevent-nprogress={!project.is_member || isArchived}
className="flex flex-col rounded border border-custom-border-200 bg-custom-background-100"
>
<ContextMenu parentRef={projectCardRef} items={MENU_ITEMS} />
@ -220,7 +221,7 @@ export const ProjectCard: React.FC<Props> = observer((props) => {
</div>
{!isArchived && (
<div className="flex h-full flex-shrink-0 items-center gap-2">
<div data-prevent-nprogress className="flex h-full flex-shrink-0 items-center gap-2">
<button
className="flex h-6 w-6 items-center justify-center rounded bg-white/10"
onClick={(e) => {