Skip to content

Commit

Permalink
Add link to course
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbainter committed Sep 3, 2023
1 parent ab32c7b commit a7f09c3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/library/library.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import React from 'react';
import { Link } from 'react-router-dom';
import Category from '../piece/category';
import useLibraryCategories from './use-library-categories';
import SoftAd from '../soft-ad/soft-ad';
import styles from './library.module.scss';

const Library = () => {
const categories = useLibraryCategories();
return (
<>
<SoftAd href="https://alexbainter.gumroad.com/l/generative-music-systems">
"Building Generative Music Systems" course available now

Check failure on line 13 in src/library/library.jsx

View workflow job for this annotation

GitHub Actions / lint

`"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`

Check failure on line 13 in src/library/library.jsx

View workflow job for this annotation

GitHub Actions / lint

`"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`
</SoftAd>
<Category
title={'Recently played'}
pieceIds={categories.history.orderedPieceIds}
Expand Down
17 changes: 17 additions & 0 deletions src/soft-ad/soft-ad.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import styles from './soft-ad.module.scss';

const SoftAd = ({ children, href }) => {

Check failure on line 4 in src/soft-ad/soft-ad.jsx

View workflow job for this annotation

GitHub Actions / lint

'children' is missing in props validation

Check failure on line 4 in src/soft-ad/soft-ad.jsx

View workflow job for this annotation

GitHub Actions / lint

'href' is missing in props validation
return (
<a
className={styles['soft-ad']}
href={href}
target="_blank"
rel="noreferrer noopener"
>
{children}
</a>
);
};

export default SoftAd;
13 changes: 13 additions & 0 deletions src/soft-ad/soft-ad.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import '@generative.fm/web-ui/styles/_theme.scss';

.soft-ad {
color: $color-grey;
display: block;
text-align: center;
padding: 1rem 1rem 0;
margin: 0 auto;
line-height: 1.5;

@include type-normal();
font-size: 0.9rem;
}

0 comments on commit a7f09c3

Please sign in to comment.