Skip to content

Fix: Add missing syntax and normalize Auth Token usage #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ch/code/examples/code-directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
例如,假设一个域(`Domain1`)的子代码中引用另一个域(`Domain2`)的源代码,如下所示:

```typescript
import { useFoo } '../../../Domain2/hooks/useFoo'
import { useFoo } from '../../../Domain2/hooks/useFoo'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭

```

如果遇到这样的 import 语句,就能很容易地意识到引用了错误的文件。
Expand Down
4 changes: 3 additions & 1 deletion ch/code/examples/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const http = {
async get(url: string) {
const token = await fetchToken();

return httpLibrary.get(url);
return httpLibrary.get(url, {
headers: { Authorization: `Bearer ${token}` }
});
}
};
```
Expand Down
2 changes: 1 addition & 1 deletion code/examples/code-directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
예를 들어, 다음과 같이 한 도메인(`Domain1`)의 하위 코드에서 다른 도메인(`Domain2`)의 소스 코드를 참조한다고 생각해 볼게요.

```typescript
import { useFoo } '../../../Domain2/hooks/useFoo'
import { useFoo } from '../../../Domain2/hooks/useFoo'
```

이런 import 문을 만난다면 잘못된 파일을 참조하고 있다는 것을 쉽게 인지할 수 있게 돼요.
Expand Down
2 changes: 1 addition & 1 deletion code/examples/form-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const schema = z.object({
email: z
.string()
.min(1, "이메일을 입력해주세요.")
.email("유효한 이메일 주소를 입력해주세요")
.email("유효한 이메일 주소를 입력해주세요.")
});

export function Form() {
Expand Down
4 changes: 3 additions & 1 deletion code/examples/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const http = {
async get(url: string) {
const token = await fetchToken();

return httpLibrary.get(url);
return httpLibrary.get(url, {
headers: { Authorization: `Bearer ${token}` }
});
}
};
```
Expand Down
2 changes: 1 addition & 1 deletion en/code/examples/code-directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If you place code files that are modified together under a single directory, it
For example, consider a case where the sub-code of one domain (`Domain1`) references the source code of another domain (`Domain2`).

```typescript
import { useFoo } '../../../Domain2/hooks/useFoo'
import { useFoo } from '../../../Domain2/hooks/useFoo'
```

When you encounter such an import statement, you can easily recognize that the wrong file is being referenced.
Expand Down
4 changes: 3 additions & 1 deletion en/code/examples/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export const http = {
async get(url: string) {
const token = await fetchToken();

return httpLibrary.get(url);
return httpLibrary.get(url, {
headers: { Authorization: `Bearer ${token}` }
});
}
};
```
Expand Down
2 changes: 1 addition & 1 deletion ja/code/examples/code-directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
例えば、次のようにあるドメイン(`Domain1`)の下にあるコードで別のドメイン(`Domain2`)のソースコードを参照していると考えてみましょう。

```typescript
import { useFoo } '../../../Domain2/hooks/useFoo'
import { useFoo } from '../../../Domain2/hooks/useFoo'
```

このような import 文に遭遇した場合、誤ったファイルを参照していることを容易に認識できるようになります。
Expand Down
4 changes: 3 additions & 1 deletion ja/code/examples/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const http = {
async get(url: string) {
const token = await fetchToken();

return httpLibrary.get(url);
return httpLibrary.get(url, {
headers: { Authorization: `Bearer ${token}` }
});
}
};
```
Expand Down