1
Fork 0
mirror of https://github.com/Steffo99/steffoweb.git synced 2024-11-21 15:44:31 +00:00

🔧 Exclude displayed projects from the "More" count

This commit is contained in:
Steffo 2021-10-25 13:27:29 +02:00
parent 2f1562798f
commit eea825074f
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 3 additions and 3 deletions

View file

@ -57,7 +57,7 @@ function App() {
<Project user={"Steffo99"} repo={"flyingsnake"}/>
<Project user={"pds-nest"} repo={"nest"}/>
<Project user={"Steffo99"} repo={"keep-everything-alive"}/>
<MoreProjects user={"Steffo99"}/>
<MoreProjects user={"Steffo99"} minus={7}/>
</Box>
</Chapter>
<Chapter>

View file

@ -3,7 +3,7 @@ import {Anchor} from "@steffo/bluelib-react"
import Style from "./MoreProjects.module.css"
export function MoreProjects({user}) {
export function MoreProjects({user, minus}) {
const [data, setData] = React.useState(null)
const [error, setError] = React.useState(null)
@ -28,7 +28,7 @@ export function MoreProjects({user}) {
() => {
if(data === null) return "Loading..."
else if(error !== null) return "Error: {error}"
return `...and ${data["public_repos"]} more!`
return `...and ${data["public_repos"] - minus} more!`
},
[data, error]
)