This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from "react"; | |
| class Article extends Component { | |
| constructor(props) { | |
| super(props) | |
| this.state = { | |
| isOpen: props.defaultOpen, | |
| idAd: props.idAd | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in some react class component | |
| handleChangeInput = (e) => { | |
| this.setState({ [e.target.name]: e.target.value }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (const a of actions) { | |
| watchers.push(yield createWatcher(a)) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| return someUnsafeAction(); | |
| } catch (e) { | |
| console.error(e); | |
| return `Error: ${e.message}`; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const currentUser = users.find(u => u.id === currentUserId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import styled from 'styled-components'; | |
| const Link = styled.a` | |
| display: block; | |
| margin-bottom: 48px; | |
| text-decoration: inherit; | |
| color: inherit; | |
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .store-card { | |
| margin-bottom: 48px; | |
| } | |
| .store-card__link { | |
| display: block; | |
| text-decoration: inherit; | |
| color: inherit; | |
| } | |
| .store-card__image { | |
| width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="store-card"> | |
| <a class="store-card__link" href="#"> | |
| <img | |
| class="store-card__image" | |
| src="https://duyt4h9nfnj50.cloudfront.net/resized/64aefca79e5d3f19540955e43e91126f-w550-bf.jpg" | |
| alt="" | |
| /> | |
| <h2 class="store-card__name">Il Patio</h2> | |
| <p class="store-card__order-info"> | |
| Заказ от |