mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 10:34:09 +03:00
fix(onboarding/survey): fix alert appearing in survey scene
This commit is contained in:
parent
19a63411dc
commit
8eb312b305
@ -96,7 +96,7 @@ const surveyPage = {
|
||||
id: "NAV_SURVEY",
|
||||
name: "Onboarding Survey",
|
||||
pageTitle: "Welcome to Slate",
|
||||
pathname: "/_/welcome",
|
||||
pathname: "/_/data",
|
||||
ignore: true,
|
||||
};
|
||||
|
||||
|
@ -218,11 +218,9 @@ export default class ApplicationLayout extends React.Component {
|
||||
)}
|
||||
<Alert
|
||||
noWarning={
|
||||
this.props.page?.id === "NAV_SIGN_IN"
|
||||
this.props.page?.id === "NAV_SIGN_IN" || this.props.page?.id === "NAV_SURVEY"
|
||||
? true
|
||||
: this.props.viewer
|
||||
? !this.props.viewer?.onboarding?.survey
|
||||
: false
|
||||
: !!this.props.viewer
|
||||
}
|
||||
onAction={this.props.onAction}
|
||||
id={this.props.isMobile ? "slate-mobile-alert" : null}
|
||||
|
@ -51,7 +51,7 @@ export function Content({ viewer, onAction, page, ...props }) {
|
||||
return (
|
||||
<div css={STYLES_DATAVIEWER_WRAPPER} {...props}>
|
||||
{objects.length ? (
|
||||
<TagsOnboarding isActive={isOnboardingActive}>
|
||||
<TagsOnboarding onAction={onAction} viewer={viewer} isActive={isOnboardingActive}>
|
||||
<DataView
|
||||
key="scene-files-folder"
|
||||
/** TODO(amine): when updating filters, update isOwner prop */
|
||||
|
@ -1,6 +1,7 @@
|
||||
import * as React from "react";
|
||||
import * as System from "~/components/system";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { css } from "@emotion/react";
|
||||
import { ModalPortal } from "../ModalPortal";
|
||||
|
||||
@ -32,14 +33,14 @@ const STYLES_POPUP_CONTENT = css`
|
||||
|
||||
export default function Popup({ children, header, css, ...props }) {
|
||||
return (
|
||||
<ModalPortal {...props}>
|
||||
<div css={[STYLES_ONBOARDING_POPUP, css]}>
|
||||
<ModalPortal>
|
||||
<motion.div css={[STYLES_ONBOARDING_POPUP, css]} {...props}>
|
||||
<System.H5 as="h1" color="textBlack" css={STYLES_POPUP_HEADER}>
|
||||
{header}
|
||||
</System.H5>
|
||||
<System.Divider color="borderGrayLight" />
|
||||
<div css={STYLES_POPUP_CONTENT}>{children}</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</ModalPortal>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user