Skip to content

Commit

Permalink
[#12] Fix loader style
Browse files Browse the repository at this point in the history
  • Loading branch information
suphanatjarukulgowit committed Mar 3, 2023
1 parent a457332 commit c9a6038
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/assets/stylesheets/components/_skeleton-loader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}
.survey-link-loader {
position: absolute;
top: 49.5%;
top: 345px;
right: 0px;
border-radius: 50%;
}
Expand All @@ -48,13 +48,13 @@
.survey-title-loader {
position: absolute;
left: 25.56%;
top: 60%;
top: 562px;
}

.survey-description-loader {
position: absolute;
left: 25.56%;
top: 65.12%;
top: 605px;
}

.user-avatar-loader {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/stylesheets/components/_survey_blank_state.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.blank-state-container {
position: absolute;
background-color: red;
width: 64px;
height: 64px;
left: 688px;
top: 318px;
}
25 changes: 25 additions & 0 deletions src/components/SurveyBlankState/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';

const surveyBlankStateTestIds = {
blankStateContainer: 'blankStateContainer',
emoji: 'blankStateEmoji',
description: 'blankStateDescription',
};

export interface SurveyBlankStateProps extends React.HTMLAttributes<HTMLDivElement> {
emoji: string;
description: string;
}

const SurveyBlankState = ({ emoji, description, ...props }: SurveyBlankStateProps) => {
return (
<div className="blank-state-container" data-test-id={surveyBlankStateTestIds.blankStateContainer} {...props}>
<div className="blank-state-emoji" data-test-id={surveyBlankStateTestIds.emoji}>
{emoji}
</div>
<h2 data-test-id={surveyBlankStateTestIds.description}>{description}</h2>
</div>
);
};

export default SurveyBlankState;
2 changes: 1 addition & 1 deletion src/screens/Survey/SurveyHomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const SurveyHomepageScreen = (): JSX.Element => {
if (surveysResponse) {
setSurveyBackground(surveysResponse[0].attributes.coverImageUrl);
}
setSuryveyLoading(false);
setSuryveyLoading(true);
}, []);

const onSlideChange = async (swiper: Swiper) => {
Expand Down

0 comments on commit c9a6038

Please sign in to comment.