Skip to content

Commit 06fbc63

Browse files
authored
Merge pull request #108 from BinaryStudioAcademy/task/thjs-58-frontend-base-structure-improvements
thjs-58: Frontend base structure improvements
2 parents fe95f46 + 249a1ab commit 06fbc63

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ yarn-error.log
7272

7373
# production
7474
build
75+
dist
7576

7677
# misc
7778
.DS_Store

client/src/libs/components/post/post.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-no-bind */
12
import PropTypes from 'prop-types';
23

34
import { IconName } from '~/libs/enums/enums.js';
@@ -44,7 +45,11 @@ const Post = ({ post, onPostLike, onExpandedPostToggle, onSharePost }) => {
4445
label={likeCount}
4546
onClick={handlePostLike}
4647
/>
47-
<IconButton iconName={IconName.THUMBS_DOWN} label={dislikeCount} />
48+
<IconButton
49+
iconName={IconName.THUMBS_DOWN}
50+
label={dislikeCount}
51+
onClick={() => {}}
52+
/>
4853
<IconButton
4954
iconName={IconName.COMMENT}
5055
label={commentCount}

client/src/packages/comment/comment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ const comment = new Comment({
99
});
1010

1111
export { comment };
12+
export { CommentPayloadKey } from './libs/enums/enums.js';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { NotificationMessage } from './notification-message.enum.js';
22
export { NotificationType } from './notification-type.enum.js';
3-
export { NotificationSocketEvent } from 'shared/src/libs/packages/notifications/notifications';
3+
export { NotificationSocketEvent } from 'shared/src/libs/packages/socket/socket.js';

client/vite.config.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import { defineConfig, loadEnv } from 'vite';
2-
import reactPlugin from '@vitejs/plugin-react';
3-
import dns from 'dns';
4-
import path from 'node:path';
1+
import { fileURLToPath } from 'node:url';
52

6-
// could be removed once node version is 17+
7-
dns.setDefaultResultOrder('verbatim');
3+
import reactPlugin from '@vitejs/plugin-react';
4+
import { defineConfig, loadEnv } from 'vite';
85

96
const config = ({ mode }) => {
107
// import.meta.env doesn't exist at this moment
@@ -20,11 +17,10 @@ const config = ({ mode }) => {
2017
return defineConfig({
2118
resolve: {
2219
alias: {
23-
'~': path.resolve(__dirname, './src')
20+
'~': fileURLToPath(new URL('src', import.meta.url))
2421
}
2522
},
2623
server: {
27-
// imgur forbids accessing its files from 127.0.0.1 (vite default host)
2824
host: VITE_HOST,
2925
port: Number(VITE_PORT),
3026
proxy: {

0 commit comments

Comments
 (0)