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 axios from "axios"; | |
| import {useMutation} from "react-query"; | |
| import {useGetUser} from "../../../api/user/index"; | |
| const url = "https://api-seller.ozon.ru/v2/product/info"; | |
| const postQuery = (data) => | |
| axios.post( | |
| url, |
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 Compose from "./Compose.js"; | |
| import Context from "./Context.js"; | |
| export default function App() { | |
| const [foo] = React.useState(1); | |
| const [bar] = React.useState(2); | |
| return ( | |
| <Compose |
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
| var object_create = Object.create; | |
| if (typeof object_create !== 'function') { | |
| object_create = function(o) { | |
| function F() {} | |
| F.prototype = o; | |
| return new F(); | |
| }; | |
| } | |
| function deepClone(src) { | |
| if(src === null || typeof(src) !== 'object'){ |
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
| Object.defineProperty(Object, 'assign', { | |
| enumerable: false, | |
| configurable: true, | |
| writable: true, | |
| value: function(target) { | |
| 'use strict'; | |
| if (target === undefined || target === null) { | |
| throw new TypeError('First argument is empty'); | |
| } |
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 [y, setY] = useState(window.scrollY); | |
| const handleNavigation = useCallback( | |
| (e) => { | |
| const window = e.currentTarget; | |
| if (y > window.scrollY) { | |
| console.log("scrolling up"); | |
| setHeaderHidden(false); | |
| } else if (y - window.scrollY < -10) { | |
| setHeaderHidden(true); |