-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add a console log for releases * fix broken console logging * Apply Prettier formatting * update the graphql query to fix sorting * Apply Prettier formatting * remove the graphql filter * Apply Prettier formatting * don't display releases older than a year * Apply Prettier formatting * arbitrary change to trigger build * filter releases earlier * Apply Prettier formatting * maybe fix filtering * Apply Prettier formatting * maybe fix filtering again * Apply Prettier formatting * change the title and remove the heading * Align title in template file * Align title in template file --------- Co-authored-by: Pantheon Bot <[email protected]> Co-authored-by: Rachel <[email protected]>
- Loading branch information
1 parent
2121e87
commit 6387e86
Showing
5 changed files
with
64 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
import React from "react" | ||
import { useStaticQuery, graphql } from "gatsby" | ||
import React from 'react'; | ||
import { useStaticQuery, graphql } from 'gatsby'; | ||
|
||
function TerminusVersion({ text }) { | ||
const { terminusReleasesJson } = useStaticQuery( | ||
graphql` | ||
query { | ||
terminusReleasesJson { | ||
tag_name | ||
const { allTerminusReleasesJson } = useStaticQuery(graphql` | ||
query { | ||
allTerminusReleasesJson(sort: { fields: [published_at], order: DESC }) { | ||
edges { | ||
node { | ||
tag_name | ||
} | ||
} | ||
} | ||
` | ||
) | ||
} | ||
`); | ||
|
||
const latestRelease = allTerminusReleasesJson.edges[0].node.tag_name; | ||
|
||
return ( | ||
<h2> | ||
{text} {terminusReleasesJson.tag_name} | ||
{text} {latestRelease} | ||
</h2> | ||
) | ||
); | ||
} | ||
|
||
export default TerminusVersion | ||
export default TerminusVersion; |
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