mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 09:45:33 +00:00
update banner to use localstorage instead so it stays hidden
This commit is contained in:
parent
94f6ecf089
commit
04618295fe
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ export function Banner(props: {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
const hideBannerFlag = sessionStorage.getItem(`hideBanner-${props.id}`);
|
||||
const hideBannerFlag = localStorage.getItem(`hideBanner-${props.id}`);
|
||||
if (hideBannerFlag) {
|
||||
hideBanner(props.id, true);
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ export function Banner(props: {
|
|||
className="absolute right-4 hover:cursor-pointer"
|
||||
onClick={() => {
|
||||
hideBanner(props.id, true);
|
||||
sessionStorage.setItem(`hideBanner-${props.id}`, "true");
|
||||
localStorage.setItem(`hideBanner-${props.id}`, "true");
|
||||
}}
|
||||
>
|
||||
<Icon icon={Icons.X} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue