-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from vgeruso/develop
Tiny Ajustments
- Loading branch information
Showing
2 changed files
with
28 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
import React, { FC, useState } from "react"; | ||
import React, { FC, useEffect, useState } from "react"; | ||
|
||
import { ContainerDark } from "./styles"; | ||
|
||
import GitHub from '../../assets/gh.svg'; | ||
import BlueSky from '../../assets/bsky.svg'; | ||
import LinkedIn from '../../assets/linkedin.svg'; | ||
import { useYear } from "../../hooks/useYear"; | ||
import { graphql, useStaticQuery } from "gatsby"; | ||
|
||
const Footer: FC = () => { | ||
const data = useStaticQuery(graphql` | ||
query GithubSiteVersion { | ||
github { | ||
repository(name: "geruso-site", owner: "vgeruso") { | ||
releases(last: 1) { | ||
edges { | ||
node { | ||
id | ||
tag { | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`); | ||
const { year } = useYear(); | ||
|
||
const [version, setVersion] = useState<string>(''); | ||
|
||
useEffect(() => { | ||
setVersion(data.github.repository.releases.edges[0].node.tag.name); | ||
}, []); | ||
|
||
return ( | ||
<ContainerDark> | ||
<div className="centralize"> | ||
|
@@ -27,7 +52,7 @@ const Footer: FC = () => { | |
<p className="justify"> | ||
<a href="mailto:[email protected]">[email protected]</a> | ||
</p> | ||
<span className="justify">Created by Victor Geruso - {year}</span> | ||
<span className="justify">Created by Victor Geruso - {year} - v{version}</span> | ||
</div> | ||
</ContainerDark> | ||
); | ||
|