Skip to content

Commit

Permalink
fix: 319 bug error when adding new highscore for dummy bots (#323)
Browse files Browse the repository at this point in the history
Co-authored-by: Malin <[email protected]>
  • Loading branch information
wadholm and wadholm authored Sep 25, 2023
1 parent d4e559d commit 0164c87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/components/Board/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ export const Cell: FC<CellProps> = memo((props) => {
<div
key={id}
className={`border-l w-full aspect-square relative overflow-hidden ${
gameObject && (gameObject.type as GameObjectType)
gameObject && gameObject.type
? 'flex items-center justify-center'
: 'justify-center'
}`}
>
{gameObject && (gameObject.type as GameObjectType) && (
{gameObject && gameObject.type && (
<div className="flex flex-col w-full">
<p className="text-[6px] text-black dark:text-white max-w-[98%] self-center sm:text-[10px] overflow-hidden whitespace-nowrap truncate">
{getCharacterName(gameObject)}
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/HighScoreTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const HighScoreTable: FC<HighScoreProps> = memo((props) => {
<Table
label="Highscore"
cols={['Name', 'Team', 'Score']}
// data={highscore}
data={highscore.map((item) => {
return {
name: item.botName,
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/components/SideMenu/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const SideMenu: FC<SideMenuProps> = memo((props) => {
const { boardId, onBoardChange, bots } = props;
const currentSeason = useCurrentSeason();

const [seasonId, setSeasonId] = useState<string>('0');
const [seasonId, setSeasonId] = useState<string>(
'00000000-0000-0000-0000-000000000000',
);
const [rulesVisible, setRulesVisible] = useState<boolean>(false);

const onSeasonChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
Expand Down

0 comments on commit 0164c87

Please sign in to comment.