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
@InputType() | |
export class Pagination { | |
@Field(() => Int, { defaultValue: 0 }) | |
skip: number; | |
@Field(() => Int, { defaultValue: 10 }) | |
take: number; | |
} |
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
git config --global core.editor "code --wait" |
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 usePagination from 'hooks/usePagination'; | |
import Pagination from 'react-bootstrap/Pagination'; | |
.... | |
const ProductGrid = ({ | |
...props | |
}: ProductGridProps) => { | |
.... | |
const { | |
screens, breakPoint, pageSize, |
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
1. Add sitemap.xml to public folder. | |
2. Import sitemap.xml in main app.js file ( you need to add it inside src folder too ) | |
3. Update Rewrites and redirects with xml | |
</^[^.]+$|\.(?!(css|json|gif|ico|jpg|js|png|xml|txt|svg|woff|ttf)$)([^.]+$)/> |
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 { useSelector, useDispatch } from 'react-redux'; | |
import { isEmpty } from 'lodash'; | |
import lastPropertyIdSelector from 'selectors/lastPropertyId'; | |
import { setLastPropertyId } from 'slices/lastPropertyId'; | |
import propertySelector from 'selectors/properties'; | |
export default function useLastProperty() { | |
const dispatch = useDispatch(); | |
const { properties } = useSelector(propertySelector); |
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 { createSlice } from '@reduxjs/toolkit'; | |
export const initialState = {}; | |
const slice = createSlice({ | |
name: 'lastPropertyId', | |
initialState, | |
reducers: { | |
store(state, action) { | |
const { payload } = action; |
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
- First fetch remote | |
git fetch origin | |
- then take the checkout for the branch | |
git checkout task2 | |
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
Revert a last git | |
git revert Head | |
Revert a git commit with hash | |
git revert {hash of commit} |