Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Brandon brandonsueur

🎯
Focusing
View GitHub Profile
View card.js
import React from "react";
import PropTypes from "prop-types";
import clsx from "clsx";
import {
Card as NativeCard,
CardContent,
CircularProgress,
Box,
} from "@material-ui/core";
View CardHeader.js
import React, { isValidElement } from "react";
import {
Divider,
CardHeader as MaterialCardHeader,
IconButton,
} from "@material-ui/core";
import PropTypes from "prop-types";
import RenderActions from "@components/renderActions";
import Typography from "@components/typography";
import isEmpty from "@helpers/isEmpty";
View Card.js
import React from "react";
import PropTypes from "prop-types";
import clsx from "clsx";
import { Card as NativeCard, CardContent } from "@material-ui/core";
import { CardHeader, CardFooter } from "./components";
import Loader from "@components/loader";
import Button from "@components/button";
import Placeholder from "@components/placeholder";
View upload_firebase.js
const photo = await cameraRef.takePictureAsync({
quality: 0.7,
exif: true,
base64: true,
});
const response = await fetch(photo.uri);
const blob = await response.blob();
const ref = storage()
View gist:a6f3c5255344eb84ba56e3d703d55970
{
// editor
// "editor.fontFamily": "'Monaco', 'monospace', 'Courier New', 'Monaco', 'Droid Sans Mono', 'Fira Code', 'Courier New', monospace, 'Droid Sans Fallback'",
// "editor.fontFamily": "'Consolas', 'Fira Code', 'Dank Mono', Operator Mono,monospace, 'Courier New', 'Droid Sans Mono', 'Fira Code', 'Courier New', monospace, 'Droid Sans Fallback'",
"editor.fontFamily": "Dank Mono, SF Mono, Cascadia, Fira Code, Operator Mono, Cascadia, Operator Mono, Monaco, Dank Mono",
"editor.fontLigatures": true,
"editor.fontWeight": "600",
"editor.fontSize": 16,
"editor.glyphMargin": false,
"breadcrumbs.enabled": false,
View banner.js
import React from "react";
import { StyleSheet, Text, View } from "react-native";
const Banner = () => {
return (
<View style={styles.banner}>
<Text style={styles.bannerTitle}>
Bonsoir <Text style={{ fontWeight: "bold" }}>Elisa</Text>, 👋
</Text>
<Text style={styles.bannerParagraph}>
View gist:0d7eae71717712cf10af2a07b7c9ad36
class LastFixation extends React.Component {
componentDidMount() {
this.props.getLastFixation()
}
render() {
const { hasContracts, t, isContractsLoaded, lastFixation } = this.props
return (
hasContracts &&
View managefixation.js
import React from 'react'
import { connect } from 'react-redux'
import { withTranslation } from 'react-i18next'
import { Modal, Form, DatePicker, Select, Button, Row, Col, Alert } from 'antd'
import { Formik, Field as FormikField } from 'formik'
import { ExclamationCircleOutlined } from '@ant-design/icons'
import {
fixations,
View .json
{"type":"CONTRACT/CREATE","data":{"contract_name":"okkoefezoe","contract_energy":"gas","contract_country":"IT","contract_supplier":"okkkkk","contract_granularity":"month","contract_delivery_start":"2020-03-16","contract_delivery_end":"2022-06-17","fixations_already":"true","fixations":[{"index":1,"date":"2020-04-01","months":1,"value":80},{"index":2,"date":"2020-05-01","months":1,"value":30}],"strategy_risk":"low","notifications_email":"","notifications_sms":true,"notifications_phone":"0300330"}}
View gist:809ceb8b042816d764fe108ad95a1f77
const moment = require('moment')
const GRANULARITY_MONTH = 'month'
const GRANULARITY_QUARTER = 'quarter'
const GRANULARITY_YEAR = 'year'
/**
* getContractYearTabs
*
* @param contractStart moment
You can’t perform that action at this time.