Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api Cleanup #664

Merged
merged 3 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions frontend2/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
"*.json",
".eslintrc.js",
"tailwind.config.js",
"**/types/**",
"src/utils/types",
],
parserOptions: {
project: "tsconfig.json",
Expand All @@ -28,7 +28,6 @@ module.exports = {
},
plugins: ["react"],
rules: {
indent: ["error", 2],
semi: ["error", "always"], // require semicolons ending statements
},
settings: {
Expand Down
3 changes: 3 additions & 0 deletions frontend2/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# production
/build

# auto-generated type
src/utils/types

/coverage

package-lock.json
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
Loading