Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerkrewson committed Jul 25, 2024
1 parent 614574d commit 5ebff0f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion components/chat/ChatBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const ChatBox = ({
onValueChange={setMsgToSend}
/>
<div className="send-container">
<PrimaryButton size="small" onClick={handleConfirm}>
<PrimaryButton size="sm" onClick={handleConfirm}>
Send
</PrimaryButton>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/find/FindTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const FindTime = ({ dates }: { dates: number[] }): JSX.Element => (
<div key={i}>
{i === 0 && "and "}
{day} at <>{times}</>
<Spacer y={0.7} />
<Spacer y={1} />
</div>
))}
...and so on.
Expand Down
4 changes: 2 additions & 2 deletions components/find/FinderInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export const FinderInfoCard = ({
{subscriberCountMsg}
</div>
)}
{showSubscriberCount && showCountdown && <Spacer y={0.8} />}
{showSubscriberCount && showCountdown && <Spacer y={1} />}
{showCountdown && (
<Countdown start={countdownStart}>{countdownMsg}</Countdown>
)}
{showCountdown && findTimeDates && <Spacer y={0.2} />}
{showCountdown && findTimeDates && <Spacer y={0.5} />}
{findTimeDates && <FindTime dates={findTimeDates} />}
</SkinnyCard>
<Spacer y={1} />
Expand Down
4 changes: 2 additions & 2 deletions components/in-game/GameMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const GameMenu = ({ isHost, menuButtons }: GameMenuProps): JSX.Element => {
.filter(({ hide }) => !hide)
.map(({ label, hostOnly, onClick, badgeCount }) => (
<PrimaryButton
size="small"
type={hostOnly ? "error" : "secondary"}
size="sm"
color={hostOnly ? "danger" : "default"}
disabled={!isHost && hostOnly}
onClick={onClick}
key={label}
Expand Down
29 changes: 18 additions & 11 deletions components/layout/MainTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import converter from "phonetic-alphabet-converter";
import { Tooltip } from "@nextui-org/react";
import {
Popover,
PopoverContent,
PopoverTrigger,
Tooltip,
} from "@nextui-org/react";
import { useCallback, useState } from "react";
import { Textfit } from "@aw-web-design/react-textfit";
import { RocketcrabMode } from "../../types/enums";
Expand Down Expand Up @@ -36,17 +41,19 @@ const MainTitle = ({
<img src="/crab.svg" className="crab" alt="rocketcrab logo" />
</div>
<Textfit mode="single">
<Tooltip
text={"Copied!"}
visible={copiedTooltip}
trigger="click"
type="dark"
offset={-4}
<Popover
isOpen={copiedTooltip}
onOpenChange={(open) => setCopiedTooltip(open)}
>
<h2 className="party-url" onClick={linkCopyClick}>
{title}
</h2>
</Tooltip>
<PopoverTrigger>
<h2 className="party-url" onClick={linkCopyClick}>
{title}
</h2>
</PopoverTrigger>
<PopoverContent>
<div className="text-medium">Copied!</div>
</PopoverContent>
</Popover>
</Textfit>

{path && !disablePhonetic && (
Expand Down
2 changes: 1 addition & 1 deletion components/party/PartyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const PartyScreen = ({

return (
<div className="flex flex-col justify-center space-y-4">
<Spacer y={1.25} />
<Spacer y={2} />
<PartyStatus
selectedGame={selectedGame}
host={host}
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Home = ({ mode }: { mode: RocketcrabMode }): JSX.Element => {
};

return (
<PageLayout center={true} mode={mode}>
<PageLayout mode={mode}>
<div className="description">
{isKidsMode
? "play in class or with family!"
Expand Down
7 changes: 1 addition & 6 deletions pages/join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ export const Join = ({ mode }: { mode: RocketcrabMode }): JSX.Element => {
};

return (
<PageLayout
path={code}
disablePhonetic={true}
center={true}
mode={mode}
>
<PageLayout path={code} disablePhonetic={true} mode={mode}>
<Input
label="Join Party"
placeholder="ex. abcd"
Expand Down

0 comments on commit 5ebff0f

Please sign in to comment.