Skip to content

Commit

Permalink
release 0.0.5 fix (#16)
Browse files Browse the repository at this point in the history
* hotfix: fixed swr issue (#15)
  • Loading branch information
SchneiderNicolas committed Oct 2, 2023
1 parent b460244 commit f58d6a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion front/package-lock.json

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

2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-responsive": "^9.0.2",
"react-router-dom": "^6.16.0",
"react-scripts": "^5.0.1",
"swr": "^2.2.2",
"swr": "^2.2.4",
"tailwindcss": "^3.3.3",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4",
Expand Down
3 changes: 2 additions & 1 deletion front/src/components/discussion/Discussion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const Discussion = () => {
mutate,
} = useSWR<DiscussionType>(
`${config.API_BASE_URL}/discussions/${discussionId}`,
(url) => fetcher(url, cookies.accessToken),
(url: string) =>
fetcher(url, cookies.accessToken) as Promise<DiscussionType>,
);
const messagesEndRef = useRef<null | HTMLDivElement>(null);

Expand Down
2 changes: 1 addition & 1 deletion front/src/components/discussion/new/UserSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const UserSearch = ({ onSelect, selectedUsers }: UserSearchProps) => {

const { data: users } = useSWR<User[]>(
searchTerm ? `${config.API_BASE_URL}/users?term=${searchTerm}` : null,
(url) => fetcher(url, cookies.accessToken),
(url: string) => fetcher(url, cookies.accessToken) as Promise<User[]>,
);

const handleKeyPress = (e: React.KeyboardEvent) => {
Expand Down

0 comments on commit f58d6a1

Please sign in to comment.