feat: should hide downloadtip when it had been closed (#3555)
This commit is contained in:
@@ -154,7 +154,10 @@ export const Header = forwardRef<
|
|||||||
PropsWithChildren<HeaderProps> & HTMLAttributes<HTMLDivElement>
|
PropsWithChildren<HeaderProps> & HTMLAttributes<HTMLDivElement>
|
||||||
>((props, ref) => {
|
>((props, ref) => {
|
||||||
const [showWarning, setShowWarning] = useState(false);
|
const [showWarning, setShowWarning] = useState(false);
|
||||||
const [showDownloadTip, setShowDownloadTip] = useState(true);
|
const isDownloadTipHide = localStorage.getItem('affine-is-dt-hide');
|
||||||
|
const [showDownloadTip, setShowDownloadTip] = useState(
|
||||||
|
isDownloadTipHide ? false : true
|
||||||
|
);
|
||||||
// const [shouldShowGuideDownloadClientTip] = useAtom(
|
// const [shouldShowGuideDownloadClientTip] = useAtom(
|
||||||
// guideDownloadClientTipAtom
|
// guideDownloadClientTipAtom
|
||||||
// );
|
// );
|
||||||
@@ -177,7 +180,10 @@ export const Header = forwardRef<
|
|||||||
{showDownloadTip ? (
|
{showDownloadTip ? (
|
||||||
<DownloadClientTip
|
<DownloadClientTip
|
||||||
show={showDownloadTip}
|
show={showDownloadTip}
|
||||||
onClose={() => setShowDownloadTip(false)}
|
onClose={() => {
|
||||||
|
setShowDownloadTip(false);
|
||||||
|
localStorage.setItem('affine-is-dt-hide', '1');
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<BrowserWarning
|
<BrowserWarning
|
||||||
|
|||||||
Reference in New Issue
Block a user