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
| // style.tsx | |
| import styled from 'styled-components'; | |
| import { Link } from 'gatsby'; | |
| import { pxToRem } from 'utils'; | |
| interface HeaderProps { | |
| scrolled: boolean; | |
| visibility: boolean; | |
| } |
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
| // action.types.ts | |
| export enum EditorTypes { | |
| SET_BLOCK_TEXT = 'SET_BLOCK_TEXT', | |
| SET_BLOCK_TYPE = 'SET_BLOCK_TYPE', | |
| SET_CURRENT_BLOCK = 'SET_CURRENT_BLOCK', | |
| ADD_BLOCK = 'ADD_BLOCK', | |
| DELETE_BLOCK = 'DELETE_BLOCK', |
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
| <Switch> | |
| <Route exact={true} path="/modal" render={() => <div>asdfasdf</div>} /> | |
| <Route | |
| exact={true} | |
| path="/modal/music" | |
| render={() => <div>asdfasdfasdf</div>} | |
| /> | |
| <Redirect to="/error" /> | |
| </Switch> |
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
| declare global { | |
| interface Window { | |
| android: any; | |
| } | |
| } | |
| window.android = { | |
| logout: () => console.log('logout'), | |
| }; |
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
| MealList.forEach((item, i, org) => { | |
| if (item.length < 5) { | |
| const InsertArr = Array(5 - item.length).fill( | |
| <MealItemComponent | |
| key={i} | |
| type="detail" | |
| item={'급식정보가\n없습니다'} | |
| date={''} | |
| today={false} | |
| day={''} |
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
| const board = | |
| draft.board[ | |
| draft.board.findIndex(board => board.pk === action.meta.board_pk) | |
| ]; | |
| Object.assign( | |
| board.comment[ | |
| board.comment.findIndex(comment => comment.pk === action.payload.pk) | |
| ], | |
| action.payload, | |
| ); |
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'; | |
| const { useRef, useCallback } = React; | |
| export function useLocalVar<T>(defaultValues: T) { | |
| const state = useRef<T>(defaultValues); | |
| const setState = useCallback(async (value: T) => { | |
| state.current = value; | |
| }, []); |
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'; | |
| const { useState, useEffect } = React; | |
| interface initialFuncProps { | |
| appId: string; | |
| csrf: string; | |
| version: string; | |
| debug?: boolean; | |
| display?: 'popup' | 'modal'; |
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'; | |
| const { useState, useEffect } = React; | |
| interface initialFuncProps { | |
| appId: string; | |
| csrf: string; | |
| version: string; | |
| debug?: boolean; | |
| display?: 'popup' | 'modal'; |
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
| module.exports = { | |
| parser: '@typescript-eslint/parser', | |
| extends: [ | |
| 'plugin:@typescript-eslint/recommended', | |
| 'react-app', | |
| 'plugin:prettier/recommended', | |
| 'prettier', | |
| 'airbnb', | |
| ], |
NewerOlder