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
const Demo = () => { | |
const [open, setOpen] = useState(false) | |
return ( | |
<> | |
<button onClick={() => setOpen(true)}>Open Modal</button> | |
<Modal open={open} onClose={() => setOpen(false)}> | |
<Modal.Header>Modal Header goes here</Modal.Header> | |
<Modal.Content>Modal Content goes here</Modal.Content> | |
<Modal.Footer>Modal Footer goes here</Modal.Footer> | |
</Modal> |
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 React from "react"; | |
import { connect } from 'react-redux'; | |
import { fabric } from "fabric"; | |
import imagesReducer from "reducers/images"; | |
import Filter from "components/Home/Filter"; | |
import { Wrapper, CanvasWrapper, Row, Column } from "./styled"; | |
// Below there is functional component approach |
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 json | |
import graphene | |
from graphql_relay.node.node import from_global_id | |
from companies import models | |
from companies.schema import CompanyNode, BrandNode | |
from franchise.utils import get_instance | |
class CompanyInput(graphene.InputObjectType): |
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
class Company(models.Model): | |
owner = models.ForeignKey(User, on_delete=models.CASCADE, null=True) | |
name = models.CharField(max_length=150, blank=False, null=False) | |
phone_number = models.CharField(max_length=15, blank=False, null=False) | |
class Brand(models.Model): | |
company = models.ForeignKey(Company, related_name='company_brand', on_delete=models.CASCADE) | |
name = models.CharField(max_length=150, blank=False, null=False) |
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
accounts/models.py | |
class Role(models.Model): | |
ROLE_CHOICES = ( | |
('agent', 'Agent'), | |
('agency', 'Agency'), | |
('manufacturer', 'Manufacturer'), | |
) |
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
console.log('background script running') |
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 React from 'react'; | |
import { Field } from 'redux-form'; | |
import { PrimaryButton, TransparentButton } from 'Components/Generics/Buttons'; | |
import { GTextField } from 'Components/Generics/Forms'; | |
import FormHeadline from '../Generics/FormHeadline'; | |
import { | |
Wrapper, | |
GridContainer, | |
FormWrapper, | |
InlineForm, |
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 { reduxForm } from 'redux-form'; | |
import { connect } from 'react-redux'; | |
import { | |
compose, | |
withState, | |
withHandlers, | |
lifecycle, | |
setStatic, | |
} from 'recompose'; | |
import validate from 'Components/Generics/Forms/validate'; |
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 pdb | |
import datetime | |
from carts.models import Cart, CartItem | |
from products.models import Variation | |
CART_ID = 'cart-id' | |
class Cart(object): |
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
//app | |
const App = props => ( | |
<Switch> | |
<UnauthenticatedRoute path="/login" name="login" component={AsyncLogin} {...props} /> | |
<UnauthenticatedRoute path="/signup" name="signup" component={AsyncSignUp} {...props} /> | |
<AuthenticatedRoute path="/" name="Home" component={AsyncHome} {...props} /> | |
</Switch> | |
); |
NewerOlder