This file contains 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
/* eslint-disable no-restricted-globals */ | |
// This service worker can be customized! | |
// See https://developers.google.com/web/tools/workbox/modules | |
// for the list of available Workbox modules, or add any other | |
// code you'd like. | |
// You can also remove this file if you'd prefer not to use a | |
// service worker, and the Workbox build step will be skipped. | |
import { clientsClaim } from 'workbox-core'; |
This file contains 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, { useState } from "react"; | |
import { TransitionGroup, CSSTransition } from "react-transition-group"; | |
import "./carousel.scss"; | |
function Carousel({ images }) { | |
const [page, setPage] = useState(0); | |
const [direction, setDirection] = useState("forward"); | |
const handleBackward = () => { | |
const newPage = page > 0 ? page - 1 : page; |
This file contains 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 webpack = require('webpack'); | |
const path = require('path'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); | |
module.exports = { | |
entry: './src/index.tsx', | |
target: 'web', | |
mode: 'development', | |
output: { |
This file contains 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
server { | |
listen 80; | |
root /home/ubuntu/test/client/build; | |
server_name SECOND_DOMAIN.ru www.SECOND_DOMAIN.ru; | |
index index.html; | |
location / { | |
proxy_pass http://127.0.0.1:5000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; |
This file contains 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
server { | |
listen 80; | |
root /home/ubuntu/node_draft_js/client/build; | |
server_name sooluk.ru www.sooluk.ru; | |
index index.html; | |
location / { | |
proxy_pass http://127.0.0.1:8080; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; |
This file contains 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
module.exports = { | |
mongoURI: process.env.MONGOURI, | |
}; |
This file contains 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
if (process.env.NODE_ENV === "production") { | |
module.exports = require("./keys_prod"); | |
} else { | |
module.exports = require("./keys_dev"); | |
} |
This file contains 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 { BrowserRouter as Router, Route, Switch, Link } from "react-router-dom"; | |
//our components | |
import Add from "../components/Add"; | |
import View from "../components/View"; | |
//ant part | |
import { Layout, Menu } from 'antd'; | |
import { PlusCircleOutlined, EyeOutlined } from '@ant-design/icons'; | |
import 'antd/dist/antd.css'; | |
const { Header, Content } = Layout; |
This file contains 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, { useEffect } from 'react'; | |
import { useDispatch, useSelector } from "react-redux"; | |
import { Link } from "react-router-dom"; | |
//actions | |
import { showPosts, deletePost } from "../actions/postAction"; | |
//draft js part | |
import draftToHtml from 'draftjs-to-html'; | |
import '../../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; | |
//ant part | |
import { Button, Row, Col, Collapse, Empty, notification } from 'antd'; |
This file contains 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, { useState, useEffect } from 'react'; | |
import { useDispatch, useSelector } from "react-redux"; | |
//draft js part | |
import { EditorState, convertToRaw, convertFromRaw } from 'draft-js'; | |
import { Editor } from 'react-draft-wysiwyg'; | |
//actions | |
import { addPost } from "../actions/postAction"; | |
//ant part | |
import { Row, Col, Form, Input, Button, notification } from 'antd'; | |
import '../../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; |
NewerOlder