Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
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 { UseQueryOptions, useQuery } from '@tanstack/react-query'; | |
| import { offersData } from '~/views/Dashboard/Offers/Offers.config'; | |
| import { offersKeys } from './offers.key'; | |
| // TODO: replace after connecting to BE | |
| type OffersType = typeof offersData; | |
| interface UseGetOffers { |
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 pause = () => | |
| new Promise((resolve) => { | |
| setTimeout(resolve, 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
| const createTeamPath = { | |
| name: NAMES.MEMBER, | |
| history, | |
| params: { | |
| memberId: currentUser?.id, | |
| memberName: transliterate(currentUser?.nickname), | |
| discipline, | |
| }, | |
| } | |
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 'weplay-core/styles/_initialization.scss'; | |
| @import 'weplay-core/styles/v-2-0/_init.scss'; | |
| .overlay { | |
| @include size(100%); | |
| @include transition(opacity); | |
| position: fixed; | |
| top: 0; | |
| left: 0; |
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
| $.fn.randomize = function (selector) { | |
| var $elems = selector ? $(this).find(selector) : $(this).children(), | |
| $parents = $elems.parent(); | |
| $parents.each(function () { | |
| $(this).children(selector).sort(function (childA, childB) { | |
| // * Prevent last slide from being reordered | |
| if($(childB).index() !== $(this).children(selector).length - 1) { | |
| return Math.round(Math.random()) - 0.5; | |
| } |
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
| mv .idea ../.idea_backup | |
| rm .idea # in case you forgot to close your IDE | |
| git rm -r .idea | |
| git commit -m "Remove .idea from repo" | |
| mv ../.idea_backup .idea |
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
| <style> | |
| .ibg{ | |
| background-position: center; | |
| background-size: cover; | |
| background-repeat: no-repeat; | |
| position: relative; | |
| } | |
| .ibg img{ |
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
| let rand = min + Math.floor(Math.random() * (max + 1 - min)); | |
| // for array | |
| let arr = ["Apple", "Orange", "Pear", "Lemon"]; | |
| let randFromArr = Math.floor(Math.random() * arr.length); | |
| console.log(arr[randFromArr]); |
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
| function getCoords(elem) { // кроме IE8- | |
| var box = elem.getBoundingClientRect(); | |
| return { | |
| top: box.top + pageYOffset, | |
| left: box.left + pageXOffset | |
| }; | |
| } |
NewerOlder