@autobusal/common 0.0.29 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/BackTo.tsx CHANGED
@@ -5,7 +5,7 @@ import { BiChevronLeftCircle } from 'react-icons/bi';
5
5
 
6
6
  interface Props {
7
7
  to: string
8
- t: TFunction<'general'>
8
+ t: TFunction<'common'>
9
9
  }
10
10
 
11
11
  const LinkStyled = styled(Link)`
@@ -28,7 +28,7 @@ const LinkStyled = styled(Link)`
28
28
  const BackTo = ({ to, t }: Props): JSX.Element => (
29
29
  <LinkStyled to={ to }>
30
30
  <BiChevronLeftCircle />
31
- { t('general:back') }
31
+ { t('back') }
32
32
  </LinkStyled>
33
33
  );
34
34
 
@@ -8,13 +8,17 @@ interface Props {
8
8
  t: TFunction<'public'>
9
9
  }
10
10
 
11
- const Douane = ({ countries, t }: Props): JSX.Element => {
11
+ const Douane = ({ countries, t }: Props): (JSX.Element | null) => {
12
12
  const items = countries.filter(item => {
13
13
  return item.city.douane == 1;
14
14
  }).map(item => (
15
15
  item.city.name
16
16
  ));
17
17
 
18
+ if (items.length === 0) {
19
+ return null;
20
+ }
21
+
18
22
  return (
19
23
  <Information>
20
24
  <Title>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/common",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "type": "module",
5
5
  "main": "index.ts"
6
6
  }