2020-12-30 07:31:20 +00:00
|
|
|
|
import React from "react";
|
|
|
|
|
|
import styled from "styled-components";
|
|
|
|
|
|
import Spinner from "components/ads/Spinner";
|
|
|
|
|
|
import { Classes } from "components/ads/common";
|
2021-02-11 06:36:07 +00:00
|
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
2021-01-08 06:06:09 +00:00
|
|
|
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
2021-02-11 06:36:07 +00:00
|
|
|
|
import { AppState } from "reducers";
|
|
|
|
|
|
import { showOnboardingLoader } from "actions/onboardingActions";
|
2020-12-30 07:31:20 +00:00
|
|
|
|
|
|
|
|
|
|
const Wrapper = styled.div`
|
2021-02-11 06:36:07 +00:00
|
|
|
|
height: calc(100vh - 48px);
|
|
|
|
|
|
width: 100%;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
display: flex;
|
2021-02-11 06:36:07 +00:00
|
|
|
|
justify-content: center;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
align-items: center;
|
2021-02-11 06:36:07 +00:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
|
|
|
|
|
|
|
.${Classes.SPINNER} {
|
|
|
|
|
|
width: 43px;
|
|
|
|
|
|
height: 43px;
|
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
|
|
|
|
|
|
|
circle {
|
|
|
|
|
|
stroke: #457ae6;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-12-30 07:31:20 +00:00
|
|
|
|
`;
|
|
|
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
|
const Image = styled.img`
|
|
|
|
|
|
width: 601px;
|
|
|
|
|
|
height: 341px;
|
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
|
object-fit: scale-down;
|
|
|
|
|
|
|
|
|
|
|
|
@media only screen and (min-height: 800px) {
|
|
|
|
|
|
height: 441px;
|
|
|
|
|
|
width: 801px;
|
|
|
|
|
|
}
|
2020-12-30 07:31:20 +00:00
|
|
|
|
`;
|
|
|
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
|
const SubTitle = styled.div`
|
|
|
|
|
|
font-size: 12px;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
|
const Title = styled.div`
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
font-weight: 500;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
|
const Description = styled.div`
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
margin-top: 18px;
|
|
|
|
|
|
width: 490px;
|
|
|
|
|
|
margin-top: 24px;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
|
@media only screen and (min-height: 800px) {
|
|
|
|
|
|
width: 630px;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
const StyledButton = styled.button`
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
background-color: #f3672a;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 17px;
|
|
|
|
|
|
padding: 12px 24px;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
cursor: pointer;
|
2021-02-11 06:36:07 +00:00
|
|
|
|
margin-top: 24px;
|
2020-12-30 07:31:20 +00:00
|
|
|
|
`;
|
|
|
|
|
|
|
2021-04-28 10:28:39 +00:00
|
|
|
|
function Welcome() {
|
2021-02-11 06:36:07 +00:00
|
|
|
|
const datasourceCreated = useSelector(
|
|
|
|
|
|
(state: AppState) => state.ui.onBoarding.createdDBQuery,
|
2020-12-30 07:31:20 +00:00
|
|
|
|
);
|
2021-02-11 06:36:07 +00:00
|
|
|
|
const dispatch = useDispatch();
|
2020-12-30 07:31:20 +00:00
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<Wrapper>
|
2021-02-11 06:36:07 +00:00
|
|
|
|
<SubTitle>WHAT WE’LL BUILD</SubTitle>
|
|
|
|
|
|
<Title>🦸🏻♂ Super Standup App</Title>
|
|
|
|
|
|
<Image
|
|
|
|
|
|
src={
|
|
|
|
|
|
"https://res.cloudinary.com/drako999/image/upload/v1611859209/Appsmith/Onboarding/standup_app.gif"
|
|
|
|
|
|
}
|
|
|
|
|
|
/>
|
|
|
|
|
|
<Description>
|
|
|
|
|
|
Superheroes much like engineers have to coordinate their daily plans so
|
|
|
|
|
|
that no villain (bug) gets away! However, all heroes hate morning
|
|
|
|
|
|
meetings so a daily standup app is just what we need.
|
|
|
|
|
|
</Description>
|
|
|
|
|
|
{datasourceCreated ? (
|
|
|
|
|
|
<StyledButton
|
|
|
|
|
|
className="t--start-building"
|
|
|
|
|
|
onClick={() => {
|
|
|
|
|
|
AnalyticsUtil.logEvent("ONBOARDING_START_BUILDING");
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(showOnboardingLoader(false));
|
|
|
|
|
|
}}
|
|
|
|
|
|
>
|
|
|
|
|
|
Start Building
|
|
|
|
|
|
</StyledButton>
|
|
|
|
|
|
) : (
|
|
|
|
|
|
<Spinner />
|
|
|
|
|
|
)}
|
2020-12-30 07:31:20 +00:00
|
|
|
|
</Wrapper>
|
|
|
|
|
|
);
|
2021-04-28 10:28:39 +00:00
|
|
|
|
}
|
2020-12-30 07:31:20 +00:00
|
|
|
|
|
|
|
|
|
|
export default Welcome;
|