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

expose standings #87

Merged
merged 1 commit into from
Nov 8, 2024
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
18 changes: 9 additions & 9 deletions src/Components/Sponsor/Card/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import styles from "./Card.module.scss";

const Card = ({ photo, link, SponsorType }) => {
return (
<div>
<div className={styles.card}>
<div className={styles.wrapper}>
<div className={styles.box}>
<a href={link} target="_blank" rel="noreferrer">
<img src={photo} className={styles.im} alt="logo" />
</a>
<div>
<div className={styles.card}>
<div className={styles.wrapper}>
<div className={styles.box}>
<a href={link} target="_blank" rel="noreferrer">
<img src={photo} className={styles.im} alt="logo" />
</a>
</div>
</div>
</div>
</div>
<div className={styles.sponsorHeading}>{SponsorType}</div>
<div className={styles.sponsorHeading}>{SponsorType}</div>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Sponsor/Card/Card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
}
}
.sponsorHeading{
.sponsorHeading {
font-size: 1rem;
text-align: center;
font-weight: 600;
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Sponsor/Sponsor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ const Sponsor = () => {
<h1 className={styles.heading}>Sponsors</h1>
<div className={styles.innerCont}>
{sponsors.map((sponsor) => (
<Card key={sponsor.id} photo={sponsor.img} link={sponsor.uri} SponsorType={sponsor.type}/>
<Card
key={sponsor.id}
photo={sponsor.img}
link={sponsor.uri}
SponsorType={sponsor.type}
/>
))}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/Pages/CFStandings/CfStandings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function pullData(message, time) {
const hashArray = Array.from(new Uint8Array(hashBuffer));
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
const res = await fetch(
`https://codeforces.com/api/contest.standings?contestId=499481&apiKey=${key}&time=${time}&apiSig=123456<${hashHex}>`
`https://codeforces.com/api/contest.standings?contestId=563188&apiKey=${key}&time=${time}&apiSig=123456<${hashHex}>`
);
if (!res.ok) throw new Error("Network response was not ok");
return res.json();
Expand Down Expand Up @@ -42,7 +42,7 @@ const CfStandings = () => {

const Wrapper = () => {
const nowTime = Math.floor(Date.now() / 1000);
const code = `123456/contest.standings?apiKey=${key}&contestId=499481&time=${nowTime}#${secret}`;
const code = `123456/contest.standings?apiKey=${key}&contestId=563188&time=${nowTime}#${secret}`;
const { isLoading, error, data } = useQuery({
queryKey: ["repoData"],
queryFn: () => pullData(code, nowTime),
Expand Down Expand Up @@ -76,7 +76,7 @@ const Wrapper = () => {
return (
<div className={styles.wrapper}>
<div className={styles.headerCont}>
<h1 className={styles.header}>nits hacks 6.0 finals</h1>
<h1 className={styles.header}>prelims standings</h1>
</div>
<div className={styles.inputCont}>
<input
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Event/Event.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Event = () => {
</div>
<div className={styles.bottom}>
<Button name="register now" ohref={info.gform} />
<Button name="back to home" ohref="/" />
<Button name="view standings" ohref="/event/3/standings" />
</div>
</div>
<div className={styles.right}>
Expand Down
Loading