@mirai/core 0.3.100 → 0.3.102

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.3.100",
3
+ "version": "0.3.102",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",
@@ -7,56 +7,60 @@ import { useLocation } from 'wouter';
7
7
  import * as style from './App.module.css';
8
8
 
9
9
  export const Container = ({ children }) => {
10
- const [, setLocation] = useLocation();
10
+ const [location, setLocation] = useLocation();
11
11
 
12
12
  const {
13
13
  value: { session },
14
14
  } = useStore();
15
15
 
16
+ const showHeader = !location.includes('/step');
17
+
16
18
  return (
17
19
  <>
18
- <View tag="header" className={style.header}>
19
- <View row className={[style.wrapper, style.environment]}>
20
- <Text small className={[style.contact, style.hideMobile]}>
21
- Contact us directly at +34 (0) 129 039 193
22
- </Text>
23
- <View data-mirai-component="environment" data-locale="true" data-currencies="true" data-state="true" />
24
- </View>
25
-
26
- <View row className={[style.wrapper, style.main]}>
27
- <View row>
28
- <Action onPress={() => setLocation('/')}>
29
- <Text>Home</Text>
30
- </Action>
20
+ {showHeader && (
21
+ <View tag="header" className={style.header}>
22
+ <View row className={[style.wrapper, style.environment]}>
23
+ <Text small className={[style.contact, style.hideMobile]}>
24
+ Contact us directly at +34 (0) 129 039 193
25
+ </Text>
26
+ <View data-mirai-component="environment" data-locale="true" data-currencies="true" data-state="true" />
27
+ </View>
31
28
 
32
- <Action className={style.hideMobile} onPress={() => setLocation('/about-us')}>
33
- <Text>About Us</Text>
34
- </Action>
29
+ <View row className={[style.wrapper, style.main]}>
30
+ <View row>
31
+ <Action onPress={() => setLocation('/')}>
32
+ <Text>Home</Text>
33
+ </Action>
35
34
 
36
- <Action className={style.hideMobile} onPress={() => setLocation('/rooms')}>
37
- <Text>Our Rooms</Text>
38
- </Action>
39
- </View>
35
+ <Action className={style.hideMobile} onPress={() => setLocation('/about-us')}>
36
+ <Text>About Us</Text>
37
+ </Action>
40
38
 
41
- <View>
42
- <Action inline onPress={() => setLocation('/')}>
43
- <Text bold headline level={1} className={style.textBrand}>
44
- Monalisa
45
- </Text>
46
- </Action>
47
- <Text small>HOTEL & RESORT</Text>
48
- </View>
39
+ <Action className={style.hideMobile} onPress={() => setLocation('/rooms')}>
40
+ <Text>Our Rooms</Text>
41
+ </Action>
42
+ </View>
49
43
 
50
- <View row>
51
- <View data-mirai-component="session" />
52
- {!session && (
53
- <Action className={style.hideMobile} onPress={() => setLocation('/signup')}>
54
- <Text>Signup</Text>
44
+ <View>
45
+ <Action inline onPress={() => setLocation('/')}>
46
+ <Text bold headline level={1} className={style.textBrand}>
47
+ Monalisa
48
+ </Text>
55
49
  </Action>
56
- )}
50
+ <Text small>HOTEL & RESORT</Text>
51
+ </View>
52
+
53
+ <View row>
54
+ <View data-mirai-component="session" />
55
+ {!session && (
56
+ <Action className={style.hideMobile} onPress={() => setLocation('/signup')}>
57
+ <Text>Signup</Text>
58
+ </Action>
59
+ )}
60
+ </View>
57
61
  </View>
58
62
  </View>
59
- </View>
63
+ )}
60
64
 
61
65
  <View tag="main" className={style.children}>
62
66
  {children}
@@ -1,8 +1,13 @@
1
1
  import { View } from '@mirai/ui';
2
2
  import React from 'react';
3
3
 
4
+ import { Logo } from './components';
5
+
4
6
  export const Step1 = () => (
5
7
  <>
8
+ <View data-mirai-component="header">
9
+ <Logo data-ghost />
10
+ </View>
6
11
  <View data-mirai-component="rates">
7
12
  {/* <Text data-content>
8
13
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad itaque odio inventore eos et consequuntur molestias
@@ -1,4 +1,13 @@
1
1
  import { View } from '@mirai/ui';
2
2
  import React from 'react';
3
3
 
4
- export const Step2 = () => <View data-mirai-component="checkout" data-session="false" />;
4
+ import { Logo } from './components';
5
+
6
+ export const Step2 = () => (
7
+ <>
8
+ <View data-mirai-component="header" data-login="false">
9
+ <Logo data-ghost />
10
+ </View>
11
+ <View data-mirai-component="checkout" data-session="false" />
12
+ </>
13
+ );
@@ -1,4 +1,13 @@
1
1
  import { View } from '@mirai/ui';
2
2
  import React from 'react';
3
3
 
4
- export const Step3 = () => <View data-mirai-component="booking" />;
4
+ import { Logo } from './components';
5
+
6
+ export const Step3 = () => (
7
+ <>
8
+ <View data-mirai-component="header" data-login="false">
9
+ <Logo data-ghost />
10
+ </View>
11
+ <View data-mirai-component="booking" />
12
+ </>
13
+ );
@@ -0,0 +1,20 @@
1
+ import { Action, Text, View } from '@mirai/ui';
2
+ import React from 'react';
3
+ import { useLocation } from 'wouter';
4
+
5
+ import * as style from '../../App.module.css';
6
+
7
+ export const Logo = ({ ...others }) => {
8
+ const [, setLocation] = useLocation();
9
+
10
+ return (
11
+ <View {...others}>
12
+ <Action inline onPress={() => setLocation('/')}>
13
+ <Text bold headline level={1} className={style.textBrand}>
14
+ Monalisa
15
+ </Text>
16
+ </Action>
17
+ <Text tiny>HOTEL & RESORT</Text>
18
+ </View>
19
+ );
20
+ };
@@ -0,0 +1 @@
1
+ export * from './Logo';