Skip to content

Commit

Permalink
format success
Browse files Browse the repository at this point in the history
  • Loading branch information
lowtorola committed Aug 14, 2023
1 parent cc20e51 commit bafb930
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
16 changes: 8 additions & 8 deletions frontend2/src/components/BattlecodeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ function BattlecodeTable<T>({
className={
idx % 2 === 0
? `bg-white border-b ${
onRowClick !== undefined
? "cursor-pointer hover:bg-gray-100 hover:text-gray-700"
: ""
}}`
onRowClick !== undefined
? "cursor-pointer hover:bg-gray-100 hover:text-gray-700"
: ""
}}`
: `bg-gray-50 border-b ${
onRowClick !== undefined
? "cursor-pointer hover:bg-gray-100 hover:text-gray-700"
: ""
}`
onRowClick !== undefined
? "cursor-pointer hover:bg-gray-100 hover:text-gray-700"
: ""
}`
}
>
{columns.map((col, idx) => (
Expand Down
8 changes: 3 additions & 5 deletions frontend2/src/components/elements/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React from "react";

interface ButtonProps extends React.ComponentPropsWithoutRef<"button"> {
variant?: string;
Expand All @@ -7,12 +7,10 @@ interface ButtonProps extends React.ComponentPropsWithoutRef<"button"> {

const variants: Record<string, string> = {
"": "bg-gray-50 text-gray-900 hover:bg-gray-100 ring-gray-300 ring-1 ring-inset",
"dark": "bg-gray-700 text-gray-50 hover:bg-gray-800"
dark: "bg-gray-700 text-gray-50 hover:bg-gray-800",
};

const Button: React.FC<ButtonProps> = (
{ variant, label, ...rest }
) => {
const Button: React.FC<ButtonProps> = ({ variant, label, ...rest }) => {
variant = variant ?? "";
const variantStyle = variants[variant];
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend2/src/views/Rankings.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useEffect, useState } from "react";
import { EpisodeContext } from "../contexts/EpisodeContext";
import { Api } from "../utils/api";
import * as Api from "../utils/api";
import BattlecodeTable from "../components/BattlecodeTable";
import { type PaginatedTeamPublicList } from "../utils/types/model/PaginatedTeamPublicList";
import BattlecodeTableBottomElement from "../components/BattlecodeTableBottomElement";
Expand Down

0 comments on commit bafb930

Please sign in to comment.