Skip to content

Commit

Permalink
Add file downloads etc
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinhenderson committed Jan 24, 2024
1 parent a13d6fc commit 483ce02
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const LanguageLibraryRelevantResources = ({ resource }) => {
{resource.relevantResources.map((current, index) => (
<LanguageLibraryCard
index={index}
key={current.slug}
key={current.post.post_name}
resource={current}
/>
))}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import HelpIcon from "@mui/icons-material/Help";
import { BackToLink } from "../back-to-link/back-to-link";
// import { Button } from "../button/button";
import { Button } from "../button/button";
import { Image } from "../image";
import styles from "./language-library-resource-page.module.css";
import SvgIcon from "@mui/material/SvgIcon";
Expand Down Expand Up @@ -42,23 +42,25 @@ export const LanguageLibraryResourcePage = ({ resource, randomNumber }) => {
height={200}
width={400}
alt={`Screenshot of: ${resource.post.post_title}`}
priority
/>
</div>
<div>
<h1>{resource.post.post_title}</h1>
{/* <p>{resource.description}</p> */}
{/* {resource.resourceFiles.nodes.length === 1 && (
<p>{resource.post.post_content}</p>
{resource.file && (
<div className={styles.downloadButton}>
<Button href={resource.resourceFiles.nodes[0].mediaItemUrl}>
Download Resource
</Button>
<Button href={resource.file}>Download Resource</Button>
</div>
)}
{resource.resourceUrl && (

{resource.meta.resource_url[0] != "" && (
<div className={styles.downloadButton}>
<Button href={resource.resourceUrl}>Visit Resource</Button>
<Button href={resource.meta.resource_url[0]}>
Visit Resource
</Button>
</div>
)} */}
)}
</div>
</div>
<div className={styles.details}>
Expand Down
2 changes: 1 addition & 1 deletion demo.http
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ POST https://language-library.acecentre.org.uk/wp-json/language-library/v1/resou
Content-Type: application/json

{
"slugs": ["this-is-a-new-resources"]
"slugs": ["this-is-a-new-resources", "listener-mediated-phrasebook-34"]
}

### Language Library
Expand Down

0 comments on commit 483ce02

Please sign in to comment.