Добавил красивую кнопку
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 route = props.getValue;
|
||||
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 (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignContent: 'center',
|
||||
alignItems: 'center',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'space-evenly',
|
||||
height: '95vh',
|
||||
@ -17,23 +34,15 @@ const Start = (props) => {
|
||||
overflow: 'hidden',
|
||||
}}>
|
||||
<span style={{
|
||||
color: '#F68C43',
|
||||
width: '60%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
alignItems: 'start',
|
||||
fontWeight: 700,
|
||||
fontFamily: 'Raleway',
|
||||
fontSize: '40px',
|
||||
}}>Путешествия <p>просто!</p></span>
|
||||
<button onClick={() => route('/city')} style={{
|
||||
height: 70,
|
||||
borderRadius: '32px',
|
||||
backgroundColor: '#0094FF',
|
||||
border: 'none',
|
||||
fontFamily: 'Raleway',
|
||||
fontSize: '30px',
|
||||
fontWeight: 700,
|
||||
color: '#fff',
|
||||
}}>Начать</button>
|
||||
}}>Путешествия <p style={{color: '#4EB0F2'}} >Просто!</p></span>
|
||||
<iframe scrolling="no" src={kek} style={{
|
||||
overflow: 'hidden',
|
||||
border: 'none',
|
||||
|
Reference in New Issue
Block a user