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
type Props { | |
text: string; | |
isAuth: boolean; | |
status: "waiting" | "success"; | |
obj: object; | |
obj2: {}; | |
obj: { | |
id: string; | |
title: string; | |
} |
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 { createContext, useContext } from 'react'; | |
props ITheme { | |
backgroundColor: string; | |
color: string; | |
} | |
// The standard way to create context. It takes an initial value object | |
const ThemeContext = createContext<ITheme>({ | |
backgroundColor: 'black', | |
color: 'white', | |
}) |
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
type Theme = 'light' | 'dark'; | |
const ThemeContext = createContext<Theme>('dark'); | |
const App = () => ( | |
<ThemeContext.Provider value="dark"> | |
<MyComponent /> | |
</ThemeContext.Provider> | |
) | |
const MyComponent = () => { |
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, {useState, useEffect} from 'react'; | |
import axios from 'axios'; | |
interface ISUB { | |
id: number; | |
title: string; | |
} | |
interface IDATA extends Array<ISUB> {} |
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'; | |
type Theme = 'light' | 'dark'; | |
const ThemeContext = createContext<Theme>('dark'); | |
const App = () => ( | |
<ThemeContext.Provider value="dark"> | |
<MyComponent /> | |
</ThemeContext.Provider> | |
) |
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
# author kamimura | |
# blog https://code-log.net | |
# twitter https://twitter.com/kamimura_dev | |
#エラーページのnginxとバージョンを隠す | |
server_tokens off; | |
#インデックスページを非表示(デフォルトでoff) | |
autoindex off; |
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
version: 2 | |
jobs: | |
build: | |
working_directory: ~/app | |
docker: | |
- image: circleci/node:10.7.0 | |
steps: | |
- checkout | |
- run: | |
name: Install system dependencies |
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
variable "region" { | |
default = "us-central1" | |
} | |
provider "google" { | |
credentials = "${file("account.json")}" | |
project = "" | |
region = ${var.region} | |
} |
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
FROM node:8.9.1-alpine as node | |
FROM ruby:2.6.3-alpine | |
MAINTAINER hiro08 | |
COPY --from=node /opt/yarn /opt/yarn | |
COPY --from=node /usr/local/bin/node /usr/local/bin/ | |
RUN ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ | |
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg |
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 firebase from 'firebase/app'; | |
import 'firebase/firestore'; | |
import 'firebase/auth'; | |
const prodconfig = { | |
apiKey: 'XXX', | |
authDomain: 'XXX', | |
databaseURL: 'XXX', | |
projectId: 'XXX', | |
storageBucket: 'XXX', |