Skip to content

Commit

Permalink
Fix vertical overflow due to miscalculated console height
Browse files Browse the repository at this point in the history
  • Loading branch information
CarboxyDev committed Jan 8, 2024
1 parent ac5deff commit 78b7311
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import { useEffect } from 'react';
*/

export default function Home() {
let consoleHeight = 'calc(100vh - 2.25rem - 2.25rem - 1rem - 1rem - 8rem)'; // css calc() hack for greedy fluid height of console
let consoleHeight =
'calc(100vh - 2.25rem - 2.25rem - 1rem - 1rem - 1rem - 8rem)'; // css calc() hack for greedy fluid height of console

useEffect(() => {
const player = createNewLife();
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const AgeUpButton = () => {
<button
onClick={() => ageUp()}
ref={ageUpButtonRef}
className="flex w-full items-center justify-center rounded-xl border border-dark-700 bg-dark-900 text-zinc-200 shadow-md transition delay-100 duration-200 ease-linear hover:border-sky-500 hover:bg-sky-500 hover:text-white"
className="flex w-full items-center justify-center rounded-xl border border-dark-700 bg-dark-900 text-zinc-200 shadow-md transition delay-100 duration-300 ease-in hover:border-sky-500 hover:bg-sky-500 hover:text-white"
>
Age 1 month
</button>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/store/player.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { v4 as uuidv4 } from 'uuid';
import { create } from 'zustand';
import { immer } from 'zustand/middleware/immer';

Expand All @@ -12,6 +13,7 @@ import { immer } from 'zustand/middleware/immer';
*/

export interface PlayerState {
id: string;
name: string;
country: string;
gender: 'male' | 'female';
Expand Down Expand Up @@ -44,6 +46,7 @@ export interface PlayerMutations {

export const usePlayer = create<PlayerState & PlayerMutations>()(
immer((set) => ({
id: uuidv4(),
name: 'Player',
gender: 'male',
country: 'Undefined',
Expand Down

1 comment on commit 78b7311

@vercel
Copy link

@vercel vercel bot commented on 78b7311 Jan 8, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

lifely – ./

lifely-carboxydev.vercel.app
lifely.carboxy.tech
lifely-git-master-carboxydev.vercel.app

Please sign in to comment.