Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Jeremic ivanjeremic

View GitHub Profile
View delme.txt
import { FC } from 'react'
import cn from 'classnames'
import { UserNav } from '@components/common'
import { Button } from '@components/ui'
import { Bag, Cross, Check } from '@components/icons'
import { useUI } from '@components/ui/context'
import useCart from '@bigcommerce/storefront-data-hooks/cart/use-cart'
import usePrice from '@bigcommerce/storefront-data-hooks/use-price'
import CartItem from '../CartItem'
import s from './CartSidebarView.module.css'
View gist:96f412ea6dc14467a142650b9bb4b0be
const Random = () => {
const [condition, setcondition] = useState(false)
return (
<div onClick={() => setcondition(!condition)}>
{condition && <RandomComponent />}
</div>
)
}
const RandomComponent = ({ condition }) => {
return (
View make a fork of public repository private
Better explained version of https://stackoverflow.com/questions/10065526/github-how-to-make-a-fork-of-public-repository-private
>> Create a new repo (let's call it private-repo) via the Github UI. Then:
git clone --bare https://github.com/exampleuser/public-repo.git
cd public-repo.git
git push --mirror https://github.com/yourname/private-repo.git
cd ..
rm -rf public-repo.git
>> Clone the private repo so you can work on it:
@ivanjeremic
ivanjeremic / React_Context_Typescript_Snippet_VSCODE
Last active Apr 29, 2020
React_Context_Typescript_Snippet_VSCODE
View React_Context_Typescript_Snippet_VSCODE
{
"Context_Typescript": {
"prefix": "ctxts",
"body": [
"import React, { useReducer } from 'react';",
"",
"/* ***** */",
"/* Types */",
"/* ***** */",
"interface Props {",
@ivanjeremic
ivanjeremic / cloudSettings
Last active Apr 16, 2020
VSCode Settings
View cloudSettings
{"lastUpload":"2020-04-16T23:59:25.171Z","extensionVersion":"v3.4.3"}