mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 17:55: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(() => {
|
useEffect(() => {
|
||||||
const hideBannerFlag = sessionStorage.getItem(`hideBanner-${props.id}`);
|
const hideBannerFlag = localStorage.getItem(`hideBanner-${props.id}`);
|
||||||
if (hideBannerFlag) {
|
if (hideBannerFlag) {
|
||||||
hideBanner(props.id, true);
|
hideBanner(props.id, true);
|
||||||
}
|
}
|
||||||
|
|
@ -44,7 +44,7 @@ export function Banner(props: {
|
||||||
className="absolute right-4 hover:cursor-pointer"
|
className="absolute right-4 hover:cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
hideBanner(props.id, true);
|
hideBanner(props.id, true);
|
||||||
sessionStorage.setItem(`hideBanner-${props.id}`, "true");
|
localStorage.setItem(`hideBanner-${props.id}`, "true");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon icon={Icons.X} />
|
<Icon icon={Icons.X} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue