Skip to content

Commit

Permalink
feat: code formatting and remove prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
halfmoon-mind committed Jul 7, 2023
1 parent 35b4ba6 commit 6a7c441
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 35 deletions.
5 changes: 4 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
## Summary

## Check List

- [ ] PR 제목을 commit convention에 맞게 작성
- [ ] reviewer 추가

## Issue

- close #

## Test
__테스트 영상을 올리면 됩니다__

**테스트 영상을 올리면 됩니다**
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ $ up-d4te --help
```

## For Developer

for install packages and make watcher for build program

```bash
$ npm i
$ npm run dev
```

and run in another terminal

```bash
$ npm start
```
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"eslint-plugin-react-hooks": "^4.6.0",
"import-jsx": "^5.0.0",
"ink-testing-library": "^3.0.0",
"prettier": "^2.8.7",
"xo": "^0.53.1"
},
"ava": {
Expand Down
60 changes: 30 additions & 30 deletions source/store.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import { observable, action } from "mobx";
import { createContext } from "react";
import {observable, action} from 'mobx';
import {createContext} from 'react';

export class Store {
// input
@observable
input = "";
@action
updateInput = (input) => {
this.input = input;
};
// input
@observable
input = '';
@action
updateInput = input => {
this.input = input;
};

// selectedIndex
@observable
selectedIndex = 0;
@action
selectNext = () => {
const index = this.selectedIndex + 1;
if (index >= 0 && this.results.length > index) {
this.selectedIndex = index;
}
};
@action
selectPrev = () => {
const index = this.selectedIndex - 1;
if (index >= 0 && this.results.length > index) {
this.selectedIndex = index;
}
};
}
export const store = new Store();
export const StoreContext = createContext(store);
// selectedIndex
@observable
selectedIndex = 0;
@action
selectNext = () => {
const index = this.selectedIndex + 1;
if (index >= 0 && this.results.length > index) {
this.selectedIndex = index;
}
};
@action
selectPrev = () => {
const index = this.selectedIndex - 1;
if (index >= 0 && this.results.length > index) {
this.selectedIndex = index;
}
};
}

export const store = new Store();
export const StoreContext = createContext(store);

0 comments on commit 6a7c441

Please sign in to comment.