Skip to content
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

updates for user profile and thread #19

Merged
merged 2 commits into from
Sep 27, 2024
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
5 changes: 3 additions & 2 deletions src/components/forum/boards/thread.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ const Style = {
`,
};

const ForumThread: React.FC = () => {
const { threadId: paramsThreadId } = useParams();
const ForumThread: React.FC<{ threadId: string }> = ({
threadId: paramsThreadId,
}) => {
const threadId = parseInt(paramsThreadId!);

const textAreaRef = useRef();
Expand Down
3 changes: 1 addition & 2 deletions src/components/user/userProfileMaster.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ const Style = {
`,
};

const UserProfileMaster: React.FC = () => {
const { userId } = useParams();
const UserProfileMaster: React.FC<{ userId: string }> = ({ userId }) => {
const user = useBBQuery<User>(`user-profile/${userId}`);
const { currentTheme } = useContext(ThemeContext);

Expand Down
14 changes: 14 additions & 0 deletions src/pages/forum/thread/[threadId].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { useContext } from "react";
import ForumThread from "../../../components/forum/boards/thread.component";
import { useParams } from "react-router-dom";

const ForumThreadPage: React.FC = () => {
const { threadId } = useParams();
return (
<>
<ForumThread threadId={threadId!} />
</>
);
};

export default ForumThreadPage;
19 changes: 0 additions & 19 deletions src/pages/user/profile.tsx

This file was deleted.

15 changes: 15 additions & 0 deletions src/pages/user/profile/[userId].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { useContext } from "react";
import Widget from "../../../components/common/widgets/widget.component";
import UserProfileMaster from "../../../components/user/userProfileMaster.component";
import { useParams } from "react-router-dom";

const UserProfile: React.FC = () => {
const { userId } = useParams();
return (
<>
<UserProfileMaster userId={userId!} />
</>
);
};

export default UserProfile;
44 changes: 22 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2200,11 +2200,11 @@ __metadata:
linkType: hard

"@types/node@npm:^22.7.2":
version: 22.7.2
resolution: "@types/node@npm:22.7.2"
version: 22.7.3
resolution: "@types/node@npm:22.7.3"
dependencies:
undici-types: "npm:~6.19.2"
checksum: 10c0/987e4df034e4af0ce76b938c2c0d94373da376b228f1c93081a661c77e682795c599bcad47c93c70a25b8ea443587137cf23088fb7f62ef442955f13046eae3d
checksum: 10c0/0e579813528b0370454337a952f43b792cd12731e10fdca0fdb627158e980c1219bba99e9048c134b6a19325d817016059afe016ccd372326c838a1b85a51574
languageName: node
linkType: hard

Expand Down Expand Up @@ -2528,16 +2528,16 @@ __metadata:
linkType: hard

"browserslist@npm:^4.23.1, browserslist@npm:^4.23.3":
version: 4.23.3
resolution: "browserslist@npm:4.23.3"
version: 4.24.0
resolution: "browserslist@npm:4.24.0"
dependencies:
caniuse-lite: "npm:^1.0.30001646"
electron-to-chromium: "npm:^1.5.4"
caniuse-lite: "npm:^1.0.30001663"
electron-to-chromium: "npm:^1.5.28"
node-releases: "npm:^2.0.18"
update-browserslist-db: "npm:^1.1.0"
bin:
browserslist: cli.js
checksum: 10c0/3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642
checksum: 10c0/95e76ad522753c4c470427f6e3c8a4bb5478ff448841e22b3d3e53f89ecaf17b6984666d6c7e715c370f1e7fa0cf684f42e34e554236a8b2fab38ea76b9e4c52
languageName: node
linkType: hard

Expand Down Expand Up @@ -2568,10 +2568,10 @@ __metadata:
languageName: node
linkType: hard

"caniuse-lite@npm:^1.0.30001646":
version: 1.0.30001663
resolution: "caniuse-lite@npm:1.0.30001663"
checksum: 10c0/6508e27bf7fdec657f26f318b1ab64ace6e1208ef9fedaf0975bc89046e0c683bfba837f108840ada1686ff09b8ffd01e05ac791dcf598b8f16eefb636875cf2
"caniuse-lite@npm:^1.0.30001663":
version: 1.0.30001664
resolution: "caniuse-lite@npm:1.0.30001664"
checksum: 10c0/db2b431aba41a585191ab1e4d40da0ad349ff32400edac2a167bf6bf92dbf9c704eab03dc60fb89e882ce02478d61c3036b2b1bdce8edf9b2aabda5608bae05e
languageName: node
linkType: hard

Expand Down Expand Up @@ -2794,10 +2794,10 @@ __metadata:
languageName: node
linkType: hard

"electron-to-chromium@npm:^1.5.4":
version: 1.5.28
resolution: "electron-to-chromium@npm:1.5.28"
checksum: 10c0/6e2f4150ba03ce53ca128955c7d2da071d3774362a10c68848a85b71c29857915e2256cb53cd2de17fdbf0f56bf76ec174d24965abef7430d8c414ec733030b2
"electron-to-chromium@npm:^1.5.28":
version: 1.5.29
resolution: "electron-to-chromium@npm:1.5.29"
checksum: 10c0/ae4849f1fe8d756d30c6f5f992803d8550a98b38a30aecc7d9776858cf229ad05b12cb9f7675f0a89330a077d16e28388cfe394fdd9d0828ffe860c8568c95c2
languageName: node
linkType: hard

Expand Down Expand Up @@ -3702,9 +3702,9 @@ __metadata:
linkType: hard

"package-json-from-dist@npm:^1.0.0":
version: 1.0.0
resolution: "package-json-from-dist@npm:1.0.0"
checksum: 10c0/e3ffaf6ac1040ab6082a658230c041ad14e72fabe99076a2081bb1d5d41210f11872403fc09082daf4387fc0baa6577f96c9c0e94c90c394fd57794b66aa4033
version: 1.0.1
resolution: "package-json-from-dist@npm:1.0.1"
checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b
languageName: node
linkType: hard

Expand Down Expand Up @@ -3849,8 +3849,8 @@ __metadata:
linkType: hard

"react-bootstrap@npm:^2.10.4":
version: 2.10.4
resolution: "react-bootstrap@npm:2.10.4"
version: 2.10.5
resolution: "react-bootstrap@npm:2.10.5"
dependencies:
"@babel/runtime": "npm:^7.24.7"
"@restart/hooks": "npm:^0.4.9"
Expand All @@ -3871,7 +3871,7 @@ __metadata:
peerDependenciesMeta:
"@types/react":
optional: true
checksum: 10c0/83e62ee90aee99b81ec0d3c002bd5b757f1749c536e55f3ae801e3748d0df854c224e6a6b38d93a6044360531d92ace6acd1dee72503180b29775d2e5fb0d6c9
checksum: 10c0/7bc56941674adf49416b74a4ea0a34d787792f67e2d4b32a40f497a80dda86fcac4b7c1627796f5b54626de5eb7c8bbfca192dd885e638e78c54d1431d6fe97c
languageName: node
linkType: hard

Expand Down