git remove local stale branches which already deleted remotely
git fetch --prune origin |
git fetch --prune origin |
xs
: Extra small devices (less than 600px)sm
: Small devices (600px and up)md
: Medium devices (900px and up)lg
: Large devices (1200px and up)xl
: Extra large devices (1536px and up)<Box sx={(theme) => ({ textAlign: 'center', [theme.breakpoints.up('md')]: { textAlign: 'left' }, })} > TEXT </Box> |
theme.breakpoints.up(‘md’) means @media (min-width: 900px)
So, the above code will set the textAlign
to left
for screen sizes greater than 900px
.
const hostname = "www.someaddress.com" console.log(!!hostname.startsWith('www.') ? 'matching' : 'not matching') |
'use client' import {usePathname, useParams, useSearchParams} from "next/navigation"; // folder structure: app/team/[teamName]/page.tsx // url: http://localhost:3002/team/something?query=mine /* Expected output: Pathname: /team/something Params: something SearchParams: mine */ export default function Page() { let queryResult: string | null | undefined = null // params dataset placeholder let params: Record<string, string | string[]> | null const pathName = usePathname() params = useParams() const searchParams = useSearchParams() queryResult = searchParams?.get('query') return ( <> <div><span>Pathname: </span>{pathName}</div> <div><span>Params: </span>{params?.teamName}</div> <div><span>SearchParams: </span>{queryResult}</div> </> ) } |
PROJECT_FOLDER/package.json – configuration of installed packages and their versions
“next”: “^13.2.4” – check nextjs installed version here
PROJECT_FOLDER/tsconfig.json – Typescript configuration
PROJECT_FOLDER/.eslintrc.json – EsLint configuration
PROJECT_FOLDER/postcss.config.js – PostCSS configuration
PROJECT_FOLDER/next.config.js – NextJS configuration
PROJECT_FOLDER/tailwind.config.ts – Tailwind configuration
Three dots {…props} decompiles array and used to merge an array with individual variables
const linkProps = {
...props,
...(customname === true ? { passHref: true } : {})
}
git reset -- path/to/file git checkout -- path/to/file |
/* eslint-disable no-console */
console.log(yourtext)
/* eslint-enable no-console */
ssh-add and press [Enter] |
Enter passphrase for /path/to/.ssh/id_rsa: |
Identity added |
git checkout {branchname} {filename} |