This file contains hidden or 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
image: docker:latest | |
services: | |
- docker:dind | |
variables: | |
REGISTRY: // registry_url:port | |
GROUP: // gruop_name | |
PROJECT: // project_name | |
IMAGE: ${REGISTRY}/${GROUP}/${PROJECT} |
This file contains hidden or 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
{ | |
"setupFiles": [ | |
"./test/setup-jest.js" | |
], | |
"moduleNameMapper": { | |
"^services/GoogleApi(.*)$": "<rootDir>/test/mocks/GoogleApi", | |
"\\.(css|sass|jpe?g|svg|png)$": "identity-obj-proxy", | |
"^components(.*)$": "<rootDir>/app/components/$1", | |
"^modules(.*)$": "<rootDir>/app/modules/$1", | |
"^pages(.*)$": "<rootDir>/app/pages/$1", |
This file contains hidden or 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
version: "3" | |
services: | |
web: | |
image: // image_name | |
command: ['npm', 'run', 'server'] | |
restart: always | |
deploy: | |
restart_policy: | |
condition: any |
This file contains hidden or 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 { | |
camelCasePropNamesFormatter | |
} from 'services/utils'; | |
class GoogleApi { | |
static errorMessages = [ | |
{ | |
message: 'popup_closed_by_user', | |
isError: false | |
} |
This file contains hidden or 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 {Component} from 'react'; | |
import PropTypes from 'prop-types'; | |
import block from 'bem-cn'; | |
import './index.sass'; | |
const b = block(''); | |
export default class Component1 extends Component { | |
static propTypes = { | |
className: PropTypes.string, |
This file contains hidden or 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
#!/usr/bin/env sh | |
set -e | |
sed -i 's=\$HOSTNAME=https://'${HOSTNAME:-localhost}'=g' /usr/share/nginx/html/index.html /usr/share/nginx/html/*.js | |
exec nginx -g "daemon off;" |
This file contains hidden or 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 styled from 'styled-components'; | |
import { AddComponentProps } from '@midhub/components/dist/utils/AddComponentProps'; | |
// example 1 | |
const TestComponent = <C extends React.ElementType = 'button'>( | |
p: AddComponentProps<{ text: number }, C> | |
) => <span>{p.text}</span>; | |
const TestComponentStyled = styled(TestComponent)``; |
This file contains hidden or 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 * as React from 'react'; | |
import styled from 'styled-components'; | |
export type AddComponentProps<Props, Component extends React.ElementType> = Props & { | |
component?: Component; | |
} & Omit<React.ComponentProps<Component>, 'component' | keyof Props>; | |
// example 1 | |
const TestComponent = <C extends React.ElementType = 'button'>( | |
p: AddComponentProps<{ text: number }, C> |
This file contains hidden or 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 {ActorSubclass} from '@dfinity/agent'; | |
import { useCallback, useEffect, useState } from 'react'; | |
import cryptoJS from 'crypto-js'; | |
import type { _SERVICE } from 'PATH_TO_SERTIFIED_ASSETS_TS_IDL'; | |
export interface UseUploaderProps { | |
canister: ActorSubclass<_SERVICE>; | |
chunkSize?: number; | |
chunksPerOperation?: number; | |
progress?(stats: Stats): any; |
This file contains hidden or 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 { cn } from '@bem-react/classname'; | |
// Суть в том, что ListItem с дополнительной UI логикой типа disabled пригодится в будущем еще много где | |
// И в будущем ляжет в UIKIT | |
const cls = cn('list-item'); | |
export interface ListItemProps<T extends keyof React.ReactHTML = 'li'> | |
extends Omit<React.HTMLAttributes<T>, 'onClick'> { | |
disabled?: boolean; |
OlderNewer