Skip to content

Commit ea16448

Browse files
authored
Merge pull request #694 from AppQuality/insights-empty-state
🌍 feat(translation.json): add translations for empty insights section…
2 parents e36e348 + 861f462 commit ea16448

File tree

4 files changed

+101
-0
lines changed

4 files changed

+101
-0
lines changed

src/locales/en/translation.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@
284284
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_COMMENT_CARD_PLACEHOLDER": "This is a space to take notes. Choose “Edit” and start writing.",
285285
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_COMMENT_CARD_PLACEHOLDER_EMPTY_TEXTAREA": "Click on edit button to edit",
286286
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_COMMENT_CARD_TITLE": "Notes",
287+
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_BUTTON": "Try a different search",
288+
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_DESCRIPTION": "Try expanding your research by selecting fewer filters.",
289+
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_TITLE": "There are no findings matching these filters.",
287290
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_SUBTITLE": "The major results and findings on user experience",
288291
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_TITLE": "Key points",
289292
"__CAMPAIGN_PAGE_INSIGHTS_SHOW_LESS_LABEL": "Show less",

src/locales/it/translation.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@
303303
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_COMMENT_CARD_PLACEHOLDER": "Questo è uno spazio per prendere appunti. Vai su “Modifica” per cominciare a scrivere",
304304
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_COMMENT_CARD_PLACEHOLDER_EMPTY_TEXTAREA": "Inizia a scrivere...",
305305
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_COMMENT_CARD_TITLE": "Note",
306+
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_BUTTON": "Fai un’altra ricerca",
307+
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_DESCRIPTION": "Prova ad ampliare la ricerca e a selezionare meno filtri.",
308+
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_TITLE": "Non ci sono scoperte con questi filtri.",
306309
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_SUBTITLE": "Cosa abbiamo scoperto dell’esperienza utente",
307310
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_TITLE": "Punti principali",
308311
"__CAMPAIGN_PAGE_INSIGHTS_SHOW_LESS_LABEL": "Mostra meno",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { Button, LG, MD } from '@appquality/unguess-design-system';
2+
import { useTranslation } from 'react-i18next';
3+
import styled from 'styled-components';
4+
import { appTheme } from 'src/app/theme';
5+
import { ReactComponent as EmptyImg } from './assets/no-findings.svg';
6+
7+
const Container = styled.div`
8+
display: flex;
9+
align-items: center;
10+
justify-content: center;
11+
flex-direction: column;
12+
margin: ${({ theme }) => `${theme.space.xxl} 0`};
13+
`;
14+
15+
export const Empty = ({ onClick }: { onClick: () => void }) => {
16+
const { t } = useTranslation();
17+
18+
return (
19+
<Container>
20+
<EmptyImg />
21+
<LG
22+
style={{
23+
color: appTheme.palette.blue[600],
24+
marginTop: appTheme.space.md,
25+
}}
26+
>
27+
{t('__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_TITLE')}
28+
</LG>
29+
<MD
30+
style={{
31+
color: appTheme.palette.grey[500],
32+
margin: `${appTheme.space.md} auto`,
33+
}}
34+
>
35+
{t('__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_DESCRIPTION')}
36+
</MD>
37+
<Button isAccent isPrimary size="medium" onClick={onClick}>
38+
{t('__CAMPAIGN_PAGE_INSIGHTS_SECTION_EMPTY_BUTTON')}
39+
</Button>
40+
</Container>
41+
);
42+
};
Lines changed: 53 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)