##Погодное одностраничное веб-приложение
(!) Данные можно взять с сайта openweathermap.org или с любого другого сервиса.
(!) Обязательно использовать react.js и redux.
Приложение должно уметь:
- Добавлять/удалять города
- Сохранять локально данные
heightDetect(); | |
function heightDetect(){ | |
$(".main_head").css('height',$(window).height()); | |
}; | |
$(window).resize(function(){ | |
heightDetect(); | |
}); |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
// Mobile First | |
@media screen and (min-width: 321px) { // iPhone landscape | |
} | |
@media screen and (min-width: 481px) { // iPad portrait | |
} |
import React, {Component} from 'react'; | |
import './App.css'; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
data: [], | |
inputVal: '', | |
} |
##Погодное одностраничное веб-приложение
(!) Данные можно взять с сайта openweathermap.org или с любого другого сервиса.
(!) Обязательно использовать react.js и redux.
Приложение должно уметь:
.menu__item_active:after { | |
content: ""; | |
display: block; | |
width: 100%; | |
height: 2px; | |
background: url(../img/border.svg) no-repeat; | |
position: absolute; | |
background-size: cover; | |
left: 0; | |
bottom: -5px; |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import {graphql, QueryRenderer, createPaginationContainer} from 'react-relay'; | |
import {Button} from 'react-bootstrap'; | |
import environment from '@/environment'; | |
import PageBar from '@/components/PageBar'; | |
import Loading from '@/components/Loading'; | |
import OrderTableRelay from '@/components/OrderTableRelay'; |
import { useLayoutEffect, useState } from "react"; | |
export const useWindowSize = () => { | |
const [size, setSize] = useState([0, 0]); | |
useLayoutEffect(() => { | |
function updateSize() { | |
setSize([window.innerWidth, window.innerHeight]); | |
} | |
window.addEventListener("resize", updateSize); | |
updateSize(); |
import { useState } from "react"; | |
export const useLocalStorage = (key, initialValue) => { | |
const [storedValue, setStoredValue] = useState(() => { | |
try { | |
const item = window.localStorage.getItem(key); | |
return item ? JSON.parse(item) : initialValue; | |
} catch (error) { | |
console.log(error); | |
return initialValue; |
{ | |
base_aa: 'GGLDAQJOMIACSC3WSF7YI47OERBN3LYK', | |
params: { | |
oracle: 'F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N', | |
overcollateralization_ratio: 1.5, | |
max_loan_value_in_underlying: 10000000, | |
decimals: 2, | |
auction_period: 3000, | |
liquidation_ratio: 1.3, | |
feed_name: 'GBYTE_USD', |