Skip to content

Commit

Permalink
fix: ui error
Browse files Browse the repository at this point in the history
  • Loading branch information
kcwww committed Nov 16, 2024
1 parent 910628f commit f76d941
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions app/(protected)/main/_components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ const Main = ({ userData }: { userData: User }) => {

useEffect(() => {
resetModel();
}, []);
}, [resetModel]);

if (isLoading || isError) return null;
if (!data) return null;

const crystalCount = data.length;
const messageCount = data.reduce(
(acc, cur) => acc + cur.message_id.length,
0
);
const messageCount = data.reduce((acc, cur) => {
if (cur === null || cur === undefined) return acc;
return acc + cur.message_id.length;
}, 0);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ html::-webkit-scrollbar {
}

.ui-section {
@apply pointer-events-none relative flex min-h-dvh w-full flex-col items-center justify-between overflow-hidden px-10 pb-20 pt-10;
@apply pointer-events-none relative flex h-dvh w-full flex-col items-center justify-between overflow-hidden px-10 pb-20 pt-10;
z-index: 1;
}

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"prepare": "husky install",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"test": "jest --watch"
"test": "jest --watch",
"mobile": "next dev -H 0.0.0.0 -p 3000"
},
"dependencies": {
"@hookform/resolvers": "^3.9.0",
Expand Down

0 comments on commit f76d941

Please sign in to comment.