-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efe3d70
commit 83a4bb9
Showing
21 changed files
with
169 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { useWindowSize } from "@uidotdev/usehooks"; | ||
|
||
import { ScrollArea } from "@/common/ui/components"; | ||
|
||
import type { VotingRoundWinner } from "../types"; | ||
|
||
export type VotingRoundWinnerListProps = { | ||
data: VotingRoundWinner[]; | ||
}; | ||
|
||
// TODO: Use VirtualScroll for better performance | ||
export const VotingRoundWinnerList: React.FC<VotingRoundWinnerListProps> = ({ data }) => { | ||
const { height: windowHeight } = useWindowSize(); | ||
|
||
return ( | ||
<section className="flex w-full flex-col"> | ||
<div className="flex justify-between bg-neutral-50 text-xs text-neutral-500"> | ||
<div className="mr-a inline-flex h-10 items-center justify-start gap-2 px-4 py-2"> | ||
<span className="font-600 shrink grow basis-0 uppercase leading-none">{"Rank"}</span> | ||
</div> | ||
|
||
<div className="mr-a inline-flex h-10 items-center justify-start gap-2 px-4 py-2"> | ||
<span className="font-600 shrink grow basis-0 uppercase leading-none">{"Projects"}</span> | ||
</div> | ||
|
||
<div className="hidden md:flex"> | ||
<div className="flex h-10 w-24 items-center px-4 py-2"> | ||
<span className="font-600 shrink grow basis-0 text-right uppercase leading-none"> | ||
{"Votes"} | ||
</span> | ||
</div> | ||
|
||
<div className="flex h-10 w-24 items-center px-4 py-2"> | ||
<span className="font-600 shrink grow basis-0 text-center uppercase leading-none"> | ||
{"Pool Allocation"} | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<ScrollArea style={{ height: (windowHeight ?? 820) - 320 }}> | ||
<div className="flex flex-col gap-2 pb-8 pt-2"> | ||
{/* {data.map((winner) => ( | ||
<VotingRoundWinnerListItem key={winner.accountId} data={winner} /> | ||
))} */} | ||
</div> | ||
</ScrollArea> | ||
</section> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.