Skip to content

Instantly share code, notes, and snippets.

View UdaraJay's full-sized avatar

Udara Jay UdaraJay

View GitHub Profile
@UdaraJay
UdaraJay / Implementation.md
Last active April 3, 2017 00:58
Global Storefront using WooCommerce with WordPress

WooCommerce on WordPress

A standard WooCommerce implementation, with theme supporting category pages inorder to imitate different storefronts.

Separate departments using categories

You can imitate the different store-fronts using different categories of products and changing the style with custom category templates.

Tutorial for custom templates: https://docs.woocommerce.com/document/template-structure/
More info on product categories: https://docs.woocommerce.com/document/managing-product-taxonomies/

  • Global shop
@UdaraJay
UdaraJay / ClassComponent.jsx
Last active June 18, 2018 13:48
Sample class based react component - ES6 (Best practices)
// Using this as a way to collect my 'best-practices' for React
// The structure of a good class based component
import React, { Component } from 'react'
// MobX is designed to enable building web applications with a complex data model in an intuitive and very performant manner.
import { observer } from 'mobx-react'
// A runtime checker for props
import { string, object } from 'prop-types'
@UdaraJay
UdaraJay / useful.md
Last active August 1, 2018 20:46
Useful things
@UdaraJay
UdaraJay / Apps.jsx
Created October 15, 2023 14:43
Animated card stack
import styles from './Apps.module.scss';
import { useEffect, useState } from 'react';
import Link from 'next/link';
const APPS = [
{
title: 'APP',
hero: 'Lorem ipsum dolor sit amet',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.',
@UdaraJay
UdaraJay / index.jsx
Created November 17, 2023 04:03
Portfolio react page example
import { Link } from "gatsby"
import React, { useEffect, useState } from "react"
import * as styles from "./work.module.scss"
import WORK from "./work.json"
const WorkPage = () => {
const [focused, setFocus] = useState(false)
const toggleFocus = src => {
if (focused === false || focused !== src) {