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

Alpha #172

Merged
merged 199 commits into from
Mar 23, 2024
Merged

Alpha #172

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
b4edbd0
new fonts
Anton-Mushnin Mar 8, 2024
1734e30
config next images
Anton-Mushnin Mar 8, 2024
01b25b5
style for <input>
Anton-Mushnin Mar 9, 2024
fe5d2fa
useLogin to return isSuccess
Anton-Mushnin Mar 9, 2024
d4123da
fallback font for inputs
Anton-Mushnin Mar 9, 2024
4d5489d
login and sign up CSS
Anton-Mushnin Mar 9, 2024
794eb54
login and sign up forms
Anton-Mushnin Mar 9, 2024
015acb9
Title screen
Anton-Mushnin Mar 9, 2024
efe72ca
prefetch banner
Anton-Mushnin Mar 9, 2024
839f480
invalid input animation
Anton-Mushnin Mar 9, 2024
29ee5de
login by default
Anton-Mushnin Mar 9, 2024
2745e95
moving token query up
Anton-Mushnin Mar 10, 2024
616f207
plug out web3ctx
Anton-Mushnin Mar 11, 2024
139ec81
next config for blb images
Anton-Mushnin Mar 11, 2024
7b21c24
CreateCharacter form
Anton-Mushnin Mar 11, 2024
4f75408
moving tokens query up
Anton-Mushnin Mar 11, 2024
bcb0dc3
changing layout
Anton-Mushnin Mar 11, 2024
bd08346
<input> style
Anton-Mushnin Mar 11, 2024
6b9de9e
CreateCharacter form cancel button, spinner
Anton-Mushnin Mar 11, 2024
8c7c860
adding icons
Anton-Mushnin Mar 11, 2024
f24872f
Loading indicator
Anton-Mushnin Mar 11, 2024
9fab411
new Navbar
Anton-Mushnin Mar 11, 2024
9d20f9e
login header
Anton-Mushnin Mar 11, 2024
a206848
New Character Button
Anton-Mushnin Mar 12, 2024
3da6aae
plus icon
Anton-Mushnin Mar 12, 2024
bcc26d3
token card for choosing
Anton-Mushnin Mar 12, 2024
1b24ae7
character creation flag
Anton-Mushnin Mar 12, 2024
fc5892d
choose token form
Anton-Mushnin Mar 12, 2024
0caad7e
playing layout style
Anton-Mushnin Mar 12, 2024
6418020
presenting views logic
Anton-Mushnin Mar 12, 2024
f02db22
new ChooseToken layout
Anton-Mushnin Mar 12, 2024
456c3ef
menu behavior
Anton-Mushnin Mar 12, 2024
a485ff5
navbar cursors
Anton-Mushnin Mar 12, 2024
ebbf258
new character button layout
Anton-Mushnin Mar 12, 2024
15c31e2
create token success handler
Anton-Mushnin Mar 12, 2024
e4455df
button style
Anton-Mushnin Mar 12, 2024
393fbf2
Roster
Anton-Mushnin Mar 12, 2024
e28c462
fetched token address fix
Anton-Mushnin Mar 13, 2024
76abce6
check tokens to fetch length
Anton-Mushnin Mar 13, 2024
8c06def
turning off old views
Anton-Mushnin Mar 13, 2024
8bcd521
next coaches images config
Anton-Mushnin Mar 13, 2024
fbd3e02
TokenCard for PvP view
Anton-Mushnin Mar 13, 2024
402935c
Roster layout
Anton-Mushnin Mar 13, 2024
9c07608
Home Page mode selector
Anton-Mushnin Mar 13, 2024
d587d91
fetching atBats
Anton-Mushnin Mar 13, 2024
8a2fab1
PvP view
Anton-Mushnin Mar 13, 2024
1367fbf
Home Page
Anton-Mushnin Mar 13, 2024
ea1761b
checking game context updates
Anton-Mushnin Mar 13, 2024
07d650d
small heat map for PvP view
Anton-Mushnin Mar 13, 2024
08c9ebe
Token card for PvP view
Anton-Mushnin Mar 13, 2024
dcce200
PvP view
Anton-Mushnin Mar 13, 2024
6617098
PvP view layout
Anton-Mushnin Mar 13, 2024
2d85175
fetching sessionState for staked Owned Tokens
Anton-Mushnin Mar 13, 2024
1527252
unstake before starting session
Anton-Mushnin Mar 13, 2024
544c446
new play buttons
Anton-Mushnin Mar 13, 2024
b5c4d35
Token card second layout
Anton-Mushnin Mar 14, 2024
93a8026
AtBat in List View
Anton-Mushnin Mar 14, 2024
fe2e935
AtBat List
Anton-Mushnin Mar 14, 2024
a8e1813
atBats refetch interval
Anton-Mushnin Mar 14, 2024
a0f2b41
adding AtBatsList
Anton-Mushnin Mar 14, 2024
0e9fb78
lint
Anton-Mushnin Mar 14, 2024
eb509d7
console.log
Anton-Mushnin Mar 14, 2024
c717e5d
copypaste fix
Anton-Mushnin Mar 14, 2024
ee88151
errors handling
Anton-Mushnin Mar 14, 2024
d35184c
my games tab
Anton-Mushnin Mar 14, 2024
b1d85f7
turning off hidden overflow
Anton-Mushnin Mar 14, 2024
16f6f37
AtBats score & outcome
Anton-Mushnin Mar 14, 2024
e62797b
reverse atBats
Anton-Mushnin Mar 14, 2024
0e31e39
distribution queries key
Anton-Mushnin Mar 14, 2024
2b1828b
Menu overlay
Anton-Mushnin Mar 14, 2024
c29174a
menu propagation fix
Anton-Mushnin Mar 14, 2024
c5c00d1
nameless token card layout
Anton-Mushnin Mar 14, 2024
5142d46
Merge branch 'new-design' into fetching-improvements
Anton-Mushnin Mar 14, 2024
b3d9a09
Merge pull request #163 from moonstream-to/fetching-improvements
Anton-Mushnin Mar 14, 2024
3361170
modes descriptions
Anton-Mushnin Mar 16, 2024
1f75716
making token optional
Anton-Mushnin Mar 16, 2024
e733bce
token card layout
Anton-Mushnin Mar 16, 2024
e4b3e0e
practice view
Anton-Mushnin Mar 16, 2024
5cfc95e
select practice bot level view
Anton-Mushnin Mar 16, 2024
f86440b
Practice page
Anton-Mushnin Mar 16, 2024
7e3efd7
storing practice in context
Anton-Mushnin Mar 16, 2024
645b42b
displaying practice view
Anton-Mushnin Mar 16, 2024
1f740a0
Token card captions and layout
Anton-Mushnin Mar 16, 2024
7c860cb
renaming list entry AtBatView
Anton-Mushnin Mar 18, 2024
8806dbf
commit button style
Anton-Mushnin Mar 18, 2024
caae7aa
Score component
Anton-Mushnin Mar 18, 2024
1027210
Storing selected token in the context
Anton-Mushnin Mar 18, 2024
a89f92d
new Grid component
Anton-Mushnin Mar 18, 2024
1df43f8
AtBat footer
Anton-Mushnin Mar 18, 2024
11c976a
new action type selector
Anton-Mushnin Mar 18, 2024
abeccd4
Token Card for Play view
Anton-Mushnin Mar 18, 2024
25797f1
joining atBat
Anton-Mushnin Mar 18, 2024
fa6526e
go to active session
Anton-Mushnin Mar 18, 2024
6a87e40
unstake before join
Anton-Mushnin Mar 18, 2024
4971d82
getAtBat for play view
Anton-Mushnin Mar 18, 2024
d4831a9
default fontFamily
Anton-Mushnin Mar 18, 2024
de345bd
New Outcome view
Anton-Mushnin Mar 18, 2024
39894f0
new types
Anton-Mushnin Mar 18, 2024
c48fc26
Heat map variant for play view
Anton-Mushnin Mar 18, 2024
d7f3022
new isRevealed & isComitted logic
Anton-Mushnin Mar 18, 2024
0298d80
new Play view
Anton-Mushnin Mar 18, 2024
a491e57
message about waiting
Anton-Mushnin Mar 18, 2024
455cadf
refetch after commit and reveal
Anton-Mushnin Mar 18, 2024
f51e218
parse pitcher and batter reveal
Anton-Mushnin Mar 19, 2024
94755cd
new bat and ball for play
Anton-Mushnin Mar 19, 2024
25c95f6
outcome
Anton-Mushnin Mar 19, 2024
207a2f2
parsing pitcher and batter in the active session
Anton-Mushnin Mar 19, 2024
69c0795
tokens refetch interval
Anton-Mushnin Mar 19, 2024
4b9adcf
tokens refetch after joining
Anton-Mushnin Mar 19, 2024
0054efc
selected token buttons style
Anton-Mushnin Mar 19, 2024
a4afe20
Footer token placeholder
Anton-Mushnin Mar 19, 2024
be010b0
bat and ball in outcome
Anton-Mushnin Mar 19, 2024
1252575
going to active session for pitcher
Anton-Mushnin Mar 19, 2024
896be49
game over screen
Anton-Mushnin Mar 19, 2024
f3f1385
default bat position
Anton-Mushnin Mar 19, 2024
bfe7dd8
joining practice, exit selection
Anton-Mushnin Mar 19, 2024
9b73b8e
multicall return structure
Anton-Mushnin Mar 19, 2024
ac68372
exit icon
Anton-Mushnin Mar 19, 2024
1b0ed8f
checking game state after commit and reveal
Anton-Mushnin Mar 19, 2024
61884b8
player view exit button
Anton-Mushnin Mar 19, 2024
9f60ec1
pitch outcome
Anton-Mushnin Mar 19, 2024
ba62071
open started pitch
Anton-Mushnin Mar 19, 2024
0e220af
tokens loading view
Anton-Mushnin Mar 19, 2024
8073356
ball in the pitcher view
Anton-Mushnin Mar 19, 2024
171062f
at bats list layout
Anton-Mushnin Mar 19, 2024
cb79766
outcome position
Anton-Mushnin Mar 19, 2024
051ab44
turning tokens slice OFF
Anton-Mushnin Mar 19, 2024
7fec020
Merge pull request #167 from moonstream-to/new-design
Anton-Mushnin Mar 19, 2024
bc182a3
lint
Anton-Mushnin Mar 19, 2024
57709f4
Merge branch 'new-design' into alpha
Anton-Mushnin Mar 19, 2024
b832c64
next.config images optimization
Anton-Mushnin Mar 19, 2024
a7a320e
Merge branch 'new-design' into alpha
Anton-Mushnin Mar 19, 2024
e8c9c70
silence Fullcount API errors
Anton-Mushnin Mar 19, 2024
d6239fc
Merge branch 'new-design' into alpha
Anton-Mushnin Mar 19, 2024
79af2b1
silence Fullcount API 500 response
Anton-Mushnin Mar 19, 2024
0bc8f21
new autoreveal logic
Anton-Mushnin Mar 19, 2024
ba29604
new contracts
Anton-Mushnin Mar 20, 2024
4f5d9d1
new images
Anton-Mushnin Mar 20, 2024
ffa708d
responsive PlayerView
Anton-Mushnin Mar 20, 2024
94e5510
responsive outcome
Anton-Mushnin Mar 20, 2024
a7c81c9
tokens offset
Anton-Mushnin Mar 20, 2024
209bb0b
'commit' button caption
Anton-Mushnin Mar 20, 2024
b2a8c9b
stop using TOKEN_CONTRACT in global gameContract
Anton-Mushnin Mar 21, 2024
4d16e2a
filter out not default owned tokens
Anton-Mushnin Mar 21, 2024
6d1bbd1
atBat outcome layout
Anton-Mushnin Mar 21, 2024
37998f1
PlayView height for safari
Anton-Mushnin Mar 21, 2024
fa9de17
Roster responsiveness
Anton-Mushnin Mar 21, 2024
8b4d77d
PvP view responsiveness and updates
Anton-Mushnin Mar 21, 2024
7d5a64e
NewCharacter button responsiveness
Anton-Mushnin Mar 21, 2024
79d876c
ModeSelector responsiveness
Anton-Mushnin Mar 21, 2024
564dc25
SignIn and SignUp responsiveness
Anton-Mushnin Mar 21, 2024
4de38a8
Loading view component
Anton-Mushnin Mar 21, 2024
8a3abda
LoadingView while getting user
Anton-Mushnin Mar 21, 2024
50f84ad
token images fallback
Anton-Mushnin Mar 21, 2024
f070423
Create Character responsive
Anton-Mushnin Mar 21, 2024
98c4d3c
HeatMap height fix
Anton-Mushnin Mar 21, 2024
9e990bd
global background
Anton-Mushnin Mar 21, 2024
7d7ccb9
global width limit
Anton-Mushnin Mar 21, 2024
0b54dfd
PvP lists equal width
Anton-Mushnin Mar 21, 2024
00ea023
handling long names
Anton-Mushnin Mar 21, 2024
8bfbdde
lint
Anton-Mushnin Mar 21, 2024
9b3f4b4
Player campaign stat
Anton-Mushnin Mar 21, 2024
6a1a7f3
atBats limit
Anton-Mushnin Mar 21, 2024
fc53a82
campaign character card
Anton-Mushnin Mar 21, 2024
360a0ed
teams view
Anton-Mushnin Mar 21, 2024
b04c2d5
Campaign view
Anton-Mushnin Mar 21, 2024
ec745c2
Show Campaign view
Anton-Mushnin Mar 21, 2024
588ffd0
character card layout
Anton-Mushnin Mar 21, 2024
6edf78a
campaign layout
Anton-Mushnin Mar 21, 2024
8e86505
teams storage module
Anton-Mushnin Mar 22, 2024
f24b2f2
campaign teams style and layout
Anton-Mushnin Mar 22, 2024
fb23299
filter out campaign bots from PvP
Anton-Mushnin Mar 22, 2024
bc96492
coach card
Anton-Mushnin Mar 22, 2024
bd6304a
practice
Anton-Mushnin Mar 22, 2024
f4bc506
filter out coaches from PvP
Anton-Mushnin Mar 22, 2024
649e102
practice style and layout
Anton-Mushnin Mar 22, 2024
37da6bf
new autoreveal useEffect deps
Anton-Mushnin Mar 22, 2024
e167e2c
ball and bat icons
Anton-Mushnin Mar 22, 2024
2aab708
chevrons icons
Anton-Mushnin Mar 22, 2024
683499d
foul is positive for pitcher
Anton-Mushnin Mar 22, 2024
c79b202
grid for pitch history
Anton-Mushnin Mar 22, 2024
21e8f8e
export session outcome
Anton-Mushnin Mar 22, 2024
f9c4903
pitches history
Anton-Mushnin Mar 22, 2024
fd8b45e
show pitches history
Anton-Mushnin Mar 22, 2024
cc21047
history z-index fix
Anton-Mushnin Mar 22, 2024
8846213
history grid borders
Anton-Mushnin Mar 22, 2024
4f06444
teams role captions
Anton-Mushnin Mar 22, 2024
76c4c79
campaign rules
Anton-Mushnin Mar 22, 2024
edc941f
login signup error handling error fix
Anton-Mushnin Mar 22, 2024
36ff990
silence reveal error, new deps for isRevealed & isCommitted
Anton-Mushnin Mar 22, 2024
8aa6a26
pitches history z-index fix
Anton-Mushnin Mar 22, 2024
89a8f96
hide campaign stat
Anton-Mushnin Mar 22, 2024
69ca8d8
new favicon
Anton-Mushnin Mar 22, 2024
6378798
navbar update
Anton-Mushnin Mar 22, 2024
5f74704
'take' button caption
Anton-Mushnin Mar 22, 2024
a475400
images fallback
Anton-Mushnin Mar 22, 2024
ae5ba9b
Merge branch 'main' into alpha
Anton-Mushnin Mar 22, 2024
640bd51
nova settings
Anton-Mushnin Mar 23, 2024
96e7c7b
coaches setup
Anton-Mushnin Mar 23, 2024
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
23 changes: 23 additions & 0 deletions web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@
const nextConfig = {
reactStrictMode: true,
trailingSlash: true,
images: {
unoptimized: true,
remotePatterns: [
{
protocol: "https",
hostname: "static.simiotics.com",
port: "",
pathname: "/fullcount/**",
},
{
protocol: "https",
hostname: "badges.moonstream.to",
port: "",
pathname: "/blb/**",
},
{
protocol: "https",
hostname: "badges.moonstream.to",
port: "",
pathname: "/fullcount-coaches/**",
},
],
},
};

module.exports = nextConfig;
10 changes: 10 additions & 0 deletions web/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Html, Head, Main, NextScript } from "next/document";
import { FULLCOUNT_ASSETS_PATH } from "../src/constants";

export default function Document() {
return (
Expand All @@ -8,6 +9,15 @@ export default function Document() {
name="robots"
content={process.env.NEXT_PUBLIC_BUILD_TARGET == "alpha" ? "noindex" : "all"}
/>
<link rel="prefetch" href={`${FULLCOUNT_ASSETS_PATH}/bi-banner.png`} as="image" />

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin={"anonymous"} />
<link
href="https://fonts.googleapis.com/css2?family=Bangers&family=Pangolin&display=swap"
rel="stylesheet"
/>

<link href="https://fonts.googleapis.com/css?family=Space Grotesk" rel="stylesheet" />
<link
rel="stylesheet"
Expand Down
13 changes: 13 additions & 0 deletions web/pages/atbats/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Layout from "../../src/components/layout/layout";
import PracticeSelect from "../../src/components/practice/PracticeSelect";
import AtBatView from "../../src/components/atbat/AtBatView";

const Home = () => {
return (
<Layout home={true} title="Fullcount">
<AtBatView />
</Layout>
);
};

export default Home;
12 changes: 12 additions & 0 deletions web/pages/practice/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Layout from "../../src/components/layout/layout";
import PracticeSelect from "../../src/components/practice/PracticeSelect";

const Home = () => {
return (
<Layout home={true} title="Fullcount">
<PracticeSelect />
</Layout>
);
};

export default Home;
Binary file modified web/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 29 additions & 11 deletions web/src/components/GlobalStyles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,39 @@

.commitButton {
display: flex;
padding: 4px 20px;
padding: 9px 20px;
justify-content: center;
align-items: center;
gap: 5px;
width: 100%;
/*align-self: stretch;*/
border: 0.5px solid #f1e3bf;
background: #00a341;
color: #fff;
font-size: 14px;
gap: 10px;
align-self: stretch;
min-height: 38px;
border: 1px solid #262019;
background: #328449;
color: #FFF;
text-align: center;
font-family: Bangers, cursive;
font-size: 18px;
font-style: normal;
font-weight: 500;
line-height: normal;
height: 31px;
font-weight: 400;
line-height: 100%; /* 18px */
letter-spacing: 0.9px;
position: relative;
width: 140px;
z-index: 2;
}

.waitingMessage {
display: flex;
width: 140px;
height: 38px;
padding: 10px 20px;
justify-content: center;
align-items: center;
gap: 10px;
z-index: 5;
border: 1px solid #262019;
position: relative;
background: #4D4D4D;
}

.mobileButton {
Expand Down
65 changes: 65 additions & 0 deletions web/src/components/HomePage/AtBatItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import styles from "./AtBatsList.module.css";
import { AtBat, OwnedToken, Token } from "../../types";
import TokenToPlay from "./TokenToPlay";
import DotsCounter from "../sessions/DotsCounter";

export const outcomes = [
"In Progress",
"Strikeout",
"Walk",
"Single",
"Double",
"Triple",
"Home Run",
"In Play Out",
];

export const outcomeType = (tokens: Token[], atBat: AtBat): "positive" | "negative" | undefined => {
const { pitcher, batter } = atBat;
if (tokens.some((t) => t.address === pitcher?.address && t.id === pitcher.id)) {
return atBat.outcome === 1 || atBat.outcome === 7 ? "positive" : "negative";
}
if (tokens.some((t) => t.address === batter?.address && t.id === batter.id)) {
return atBat.outcome === 1 || atBat.outcome === 7 ? "negative" : "positive";
}
};

const AtBatItem = ({ atBat, tokens }: { atBat: AtBat; tokens: OwnedToken[] }) => {
return (
<div className={styles.atBatContainer}>
<div className={styles.cards}>
{atBat.pitcher ? (
<TokenToPlay token={atBat.pitcher} isPitcher={true} />
) : (
<div style={{ width: "100px", height: "152px", border: "1px solid #7E8E7F" }} />
)}
<div className={styles.vs}>VS</div>
{atBat.batter ? (
<TokenToPlay token={atBat.batter} isPitcher={false} />
) : (
<div style={{ width: "100px", height: "152px", border: "1px solid #7E8E7F" }} />
)}
</div>
{atBat.outcome !== 0 ? (
<div
className={
!outcomeType(tokens, atBat)
? styles.othersOutcome
: outcomeType(tokens, atBat) === "positive"
? styles.positiveOutcome
: styles.negativeOutcome
}
>
{outcomes[atBat.outcome]}!
</div>
) : (
<div className={styles.activeAtBat}>
<DotsCounter label={"BALL"} count={atBat.balls} capacity={4} />
<DotsCounter label={"STRIKE"} count={atBat.strikes} capacity={3} />
</div>
)}
</div>
);
};

export default AtBatItem;
126 changes: 126 additions & 0 deletions web/src/components/HomePage/AtBatsList.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
.container {
display: flex;
gap: 10px;
flex-direction: column;
align-items: center;
}

.atBatContainer {
display: flex;
width: 280px;
padding: 10px;
flex-direction: column;
align-items: flex-start;
gap: 5px;

border: 1px solid #7E8E7F;
background: #FFF;
}

.cards {
display: flex;
justify-content: space-between;
align-items: center;
align-self: stretch;
}

.vs {
color: #669568;
text-overflow: ellipsis;
font-family: Bangers, cursive;
font-size: 24px;
font-style: normal;
font-weight: 400;
line-height: 100%; /* 24px */
}

.activeAtBat {
display: flex;
padding: 5px;
justify-content: center;
align-items: center;
gap: 10px;
align-self: stretch;
border: 1px solid #000;
background: #328449;
color: #FFF;
font-family: Bangers, cursive;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
}

.stat {
gap: 5px;
}
.dots {
gap: 4px;
}
.filledDot, .emptyDot {
height: 6px;
width: 6px;
border-radius: 50%;
}
.emptyDot {
background-color: #34603B;
}
.filledDot {
background-color: #FFF;
}


.positiveOutcome {
display: flex;
padding: 5px;
justify-content: center;
align-items: center;
gap: 10px;
align-self: stretch;
border: 1px solid #262019;
color: #328449;
font-family: Bangers, cursive;
font-size: 18px;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
}

.negativeOutcome {
display: flex;
width: 260px;
padding: 5px;
justify-content: center;
align-items: center;
gap: 10px;
border: 1px solid #8F8476;
background: #262019;
color: #7E8E7F;
font-family: Bangers;
font-size: 18px;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
}

.othersOutcome {
display: flex;
padding: 5px;
justify-content: center;
align-items: center;
gap: 10px;
align-self: stretch;

background: #FCECD9;
color: #262019;
font-family: Bangers, cursive;
font-size: 18px;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
}

15 changes: 15 additions & 0 deletions web/src/components/HomePage/AtBatsList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styles from "./AtBatsList.module.css";
import { AtBat, OwnedToken } from "../../types";
import AtBatItem from "./AtBatItem";

const AtBatsList = ({ atBats, tokens }: { atBats: AtBat[]; tokens: OwnedToken[] }) => {
return (
<div className={styles.container}>
{atBats.map((a, idx) => (
<AtBatItem atBat={a} key={idx} tokens={tokens} />
))}
</div>
);
};

export default AtBatsList;
33 changes: 33 additions & 0 deletions web/src/components/HomePage/HeatMapSmall.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";
import { Box, Flex, Grid } from "@chakra-ui/react";
import { valueToColor } from "../../utils/colors";

const HeatMapSmall = ({ rates, size }: { rates: number[]; size?: string }) => {
const generateCell = (index: number) => (
<Box key={index}>
<Box
height={size ?? "4px"}
width={size ?? "4px"}
display="flex"
alignItems="center"
justifyContent="center"
cursor={"pointer"}
bg={valueToColor(rates[index], rates)}
/>
</Box>
);

return (
<Flex direction={"column"} alignItems={"center"} gap={"10px"}>
<Grid
templateColumns="repeat(5, 1fr)"
w={"fit-content"}
border={size === "10px" ? "1px solid #262019" : "2px solid #262019"}
>
{Array.from({ length: 25 }).map((_, i) => generateCell(i))}
</Grid>
</Flex>
);
};

export default HeatMapSmall;
6 changes: 6 additions & 0 deletions web/src/components/HomePage/HomePage.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.container {
display: flex;
flex-direction: column;
gap: 20px; /*Roster has 10px bottom margin*/
}

Loading
Loading