Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 16s
CodeQL / Analyze (python) (push) Failing after 3s
i18n sync check / check:sync (push) Failing after 3s
React Doctor / react-doctor (push) Failing after 16s
Branch Build CE / Build-Push Admin Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Admin Manifest (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Web Manifest (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Proxy Manifest (push) Has been cancelled
Branch Build CE / Merge Space Manifest (push) Has been cancelled
Branch Build CE / Prepare AIO Assets (push) Has been cancelled
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Live Collaboration Manifest (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge API Server Manifest (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge AIO Manifest (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
/**
|
|
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
* See the LICENSE file for details.
|
|
*/
|
|
|
|
import { CloseOutline, InfoOutline } from "@makeplane/propel/icons";
|
|
// helpers
|
|
import type { TAuthErrorInfo } from "@/helpers/authentication.helper";
|
|
|
|
type TAuthBanner = {
|
|
bannerData: TAuthErrorInfo | undefined;
|
|
handleBannerData?: (bannerData: TAuthErrorInfo | undefined) => void;
|
|
};
|
|
|
|
export function AuthBanner(props: TAuthBanner) {
|
|
const { bannerData, handleBannerData } = props;
|
|
|
|
if (!bannerData) return <></>;
|
|
return (
|
|
<div className="relative flex items-center gap-2 rounded-md border border-accent-strong/50 bg-accent-primary/10 p-2">
|
|
<div className="relative flex h-4 w-4 flex-shrink-0 items-center justify-center">
|
|
<InfoOutline width={16} height={16} className="text-accent-primary" />
|
|
</div>
|
|
<div className="w-full text-13 font-medium text-accent-primary">{bannerData?.message}</div>
|
|
<div
|
|
className="relative ml-auto flex h-6 w-6 cursor-pointer items-center justify-center rounded-xs text-accent-primary/80 transition-all hover:bg-accent-primary/20"
|
|
onClick={() => handleBannerData && handleBannerData(undefined)}
|
|
>
|
|
<CloseOutline className="h-4 w-4 flex-shrink-0" />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|