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
it('only sends one welcome message', async () => { | |
mockPost('/chat.postMessage', { called: true }); | |
const channel = ''; | |
const user: SlackUser = { | |
token: '', | |
trigger_id: '', | |
view: undefined, | |
id: '', | |
team_id: '' | |
}; |
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
//source: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/17355 | |
import { RouteComponentProps } from 'react-router-dom'; | |
type MyProps = RouteComponentProps<{ id?: string }> | |
const CoolThing: React.FC<MyProps> = ({ match }) => { | |
const id = match.params.id; | |
return ( |
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
# stdout a github secret (environment variable) to stdin with docker login command | |
- run: echo ${{ secrets.GHCP_ACCESS_TOKEN }} | docker login ghcr.io -u USERNAME --password-stdin |
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, { Component } from 'react'; | |
import { Route, Switch } from 'react-router-dom'; | |
... | |
import { useRoutes } from 'hookrouter'; | |
export const routes = { | |
'/login': () => <Login /> | |
}; | |
const RenderRoutes = () => { |
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, { useEffect, useState } from 'react'; | |
import { Company } from '../../Interfaces/Interfaces.Company'; | |
// this doesn't work with brackes for some reason: | |
// const FeaturedCompanies = ({findFeaturedCompanies: () => Promise<Array<Company>>}) => { | |
const FeaturedCompanies = (findFeaturedCompanies: () => Promise<Array<Company>>) => { | |
const [featuredCompanies, setData] = useState([]); | |
useEffect(() => { |
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, { useEffect, useState } from 'react'; | |
import { Company } from '../../Interfaces/Interfaces.company'; | |
interface FeaturedCompaniesProps { | |
findFeaturedCompanies: () => Promise<Array<Company>> | |
} | |
const FeaturedCompanies = (props: FeaturedCompaniesProps) => { | |
const [featuredCompanies, setData] = useState([]); | |
useEffect(() => { |
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
name: SQL-Migrations | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
migrate: | |
name: Migrate Database |
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, { useEffect, useState } from 'react'; | |
import { CompanyNew } from '../../../Interfaces/Interfaces'; | |
import Main from '../Main'; | |
import MainLayout from '../MainLayout'; | |
interface CompanyDetailNewProps { | |
fetchCompanyNew: (apiFindCompanyNew: any, companyName: string) => Promise<CompanyNew>, | |
apiFindCompanyNew: (companyName: string) => Promise<CompanyNew>, | |
companyName: 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
CREATE TABLE countries ( | |
id integer NOT NULL, | |
name varchar(100) NOT NULL, | |
iso3 char(3) DEFAULT NULL, | |
numeric_code char(3) DEFAULT NULL, | |
iso2 char(2) DEFAULT NULL, | |
phonecode varchar(255) DEFAULT NULL, | |
capital varchar(255) DEFAULT NULL, | |
currency varchar(255) DEFAULT NULL, | |
currency_name varchar(255) DEFAULT NULL, |
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
//https://www.npmjs.com/package/isolate-react | |
it.only('shows count of all crafters', async () => { | |
const crafters = [{ ...crafterProfileData }, { ...crafterProfileData }]; | |
const foundCrafters: Crafters = { | |
list: crafters, | |
aggregates: { | |
count: crafters.length, | |
}, | |
}; |