Добавил красивую кнопку
This commit is contained in:
8502
public/circle.html
8502
public/circle.html
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,32 @@
|
|||||||
import React from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
|
import { LEFT } from "react-swipeable";
|
||||||
|
|
||||||
const Start = (props) => {
|
const Start = (props) => {
|
||||||
|
|
||||||
const route = props.getValue;
|
const route = props.getValue;
|
||||||
const kek = './circle.html'
|
const kek = './circle.html'
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handler = (ev: MessageEvent<{ type: string }>) => {
|
||||||
|
if (typeof ev.data !== 'object') return
|
||||||
|
if (!ev.data.type) return
|
||||||
|
if (ev.data.type !== 'button-click') return
|
||||||
|
|
||||||
|
route('/')
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('message', handler)
|
||||||
|
|
||||||
|
// Don't forget to remove addEventListener
|
||||||
|
return () => window.removeEventListener('message', handler)
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
alignContent: 'center',
|
alignContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
justifyContent: 'space-evenly',
|
justifyContent: 'space-evenly',
|
||||||
height: '95vh',
|
height: '95vh',
|
||||||
@ -17,23 +34,15 @@ const Start = (props) => {
|
|||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
}}>
|
}}>
|
||||||
<span style={{
|
<span style={{
|
||||||
|
color: '#F68C43',
|
||||||
|
width: '60%',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
alignItems: 'center',
|
alignItems: 'start',
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
fontFamily: 'Raleway',
|
fontFamily: 'Raleway',
|
||||||
fontSize: '40px',
|
fontSize: '40px',
|
||||||
}}>Путешествия <p>просто!</p></span>
|
}}>Путешествия <p style={{color: '#4EB0F2'}} >Просто!</p></span>
|
||||||
<button onClick={() => route('/city')} style={{
|
|
||||||
height: 70,
|
|
||||||
borderRadius: '32px',
|
|
||||||
backgroundColor: '#0094FF',
|
|
||||||
border: 'none',
|
|
||||||
fontFamily: 'Raleway',
|
|
||||||
fontSize: '30px',
|
|
||||||
fontWeight: 700,
|
|
||||||
color: '#fff',
|
|
||||||
}}>Начать</button>
|
|
||||||
<iframe scrolling="no" src={kek} style={{
|
<iframe scrolling="no" src={kek} style={{
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
|
Reference in New Issue
Block a user