Skip to content

Commit 5772e0d

Browse files
committed
fix: build release contributors
1 parent d7c7d8e commit 5772e0d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ command = "tailwindcss"
5656
args = ["-i", "./input.css", "-o", "./style/output.css"]
5757

5858
[tasks.build]
59-
dependencies = ["get-sitemap", "prebuild"]
59+
dependencies = ["get-sitemap", "prebuild", "prebuild-nixdev"]
6060
install_crate = { crate_name = "cargo-leptos", binary = "cargo", test_arg = [
6161
"leptos",
6262
"--version",
6363
], version = "0.2.16" }
6464
command = "cargo"
65-
args = ["leptos", "serve", "-r"]
65+
args = ["leptos", "build", "-r"]
6666

6767
[tasks.serve]
6868
dependencies = ["prebuild", "prebuild-nixdev"]

src/pages/contributors.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ async fn fetch_contributors() -> Result<Vec<Contributor>> {
6767

6868
let res: leptos::serde_json::Value = client
6969
.post("https://api.github.com/graphql")
70+
.json(&request_body)
7071
.send()
7172
.await?
7273
.json()
@@ -82,6 +83,8 @@ async fn fetch_contributors() -> Result<Vec<Contributor>> {
8283

8384
res.sort_by_key(|a| a.contributions_collection.total_commit_contributions);
8485

86+
println!("Result of Github Request: {res:#?}");
87+
8588
Ok(res)
8689
}
8790

@@ -94,11 +97,11 @@ pub fn Contributors() -> impl IntoView {
9497
<ContributorCard
9598
name=item.login.clone()
9699
description=item.bio.clone()
97-
link=item.html_url.clone()
100+
link=item.url.clone()
98101
brand_src=item.avatar_url.clone()
99102
twitter=item.twitter_username.clone()
100103
location=item.location.clone()
101-
contributions=item.contributions.unwrap_or(1)
104+
contributions=item.contributions_collection.total_commit_contributions
102105
/>
103106
}
104107
};

0 commit comments

Comments
 (0)