- /Projects
- <company-name>
- work-project-1
- work-project-2
- personal-project-1
- personal-project-2
// ~/.gitconfig
[includeIf "gitdir:/Projects/<company-name>/"]
path = ~/.gitconfig-company-name
// ~/.gitconfig-company-name
[user]
email = identifier@companyname.com
[core]
sshCommand = "ssh -i ~/.ssh/id_rsa_company_name.pub"
let num = 123456;
let sum = String(num)
.split('')
.reduce((acc, cur) => acc + Number(cur), 0)
alert(sum);
let num = 123456;
let sum = 0;
let str = String(num);
for (let i = 0; i < str.length; i++) {
sum += Number(str[i]);
}
alert(sum);
export default function SearchPage() {
const dispatch = useDispatch()
const location = useLocation()
React.useEffect(() => {
const [gender, typeClothes] = location.pathname.split("/")[2].split("-")
dispatch({
type:'FILTERING-DATA',
filters: [{ gender }, { typeClothes }],
})
}, [location])
return (
<div className='search-page'>
<Filters/>
<ProductList/>
</div>
)
}
import { createHashHistory } from 'history'
import { Router } from 'react-router-dom'
const history = createHashHistory()
ReactDOM.render(
<Router history={history}>
// your app
</Router>
)