Skip to content

Commit 5d43e54

Browse files
committed
fix: og-image titles, copies testimonials
1 parent 5f31bd4 commit 5d43e54

File tree

13 files changed

+30
-44
lines changed

13 files changed

+30
-44
lines changed

packages/audiodocs/docusaurus.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
const lightCodeTheme = require('./src/theme/CodeBlock/highlighting-light.js');
55
const darkCodeTheme = require('./src/theme/CodeBlock/highlighting-dark.js');
66

7+
// eslint-disable-next-line import/first
78
import remarkMath from 'remark-math';
9+
// eslint-disable-next-line import/first
810
import rehypeKatex from 'rehype-katex';
911
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
1012

@@ -79,6 +81,7 @@ const config = {
7981
themeConfig: {
8082
// Replace with your project's social card
8183
// image: 'img/docusaurus-social-card.jpg',
84+
image: 'img/og-image.png',
8285

8386
navbar: {
8487
hideOnScroll: true,

packages/audiodocs/src/audio/useEqualizerControls.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export default function useEqualizerControls(canvasRef?: React.RefObject<HTMLCan
8888
}
8989
}
9090
return -1;
91-
}, [equalizerBands, getControlPointPosition]); const handleStart = useCallback((clientX: number, clientY: number) => {
91+
}, [equalizerBands, getControlPointPosition]);
92+
93+
const handleStart = useCallback((clientX: number, clientY: number) => {
9294
if (!canvasRef?.current) {
9395
return;
9496
}
@@ -101,6 +103,7 @@ export default function useEqualizerControls(canvasRef?: React.RefObject<HTMLCan
101103

102104
const index = findControlPointAtPosition(x, y, rect);
103105
if (index !== -1) {
106+
canvasRef.current.style.cursor = 'grabbing';
104107
dragState.current = {
105108
isDragging: true,
106109
dragIndex: index,
@@ -138,6 +141,7 @@ export default function useEqualizerControls(canvasRef?: React.RefObject<HTMLCan
138141
dragState.current.isDragging = false;
139142
dragState.current.dragIndex = -1;
140143
canvasRect.current = null;
144+
canvasRef.current!.style.cursor = 'pointer';
141145
}, []);
142146

143147
const handleMouseDown = useCallback((e: MouseEvent) => {

packages/audiodocs/src/components/Canvas/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useRef, useState, useLayoutEffect, memo, forwardRef } from 'react';
22

33
import styles from './styles.module.css';
4+
import clsx from 'clsx';
45

56
export interface CanvasContext {
67
canvas: HTMLCanvasElement;
@@ -11,13 +12,14 @@ interface CanvasProps<RenderingContext> {
1112
height?: number;
1213
prepareRenderingContext?: (canvasContext: CanvasContext) => RenderingContext;
1314
onDraw?: (canvasContext: CanvasContext, renderingContext: RenderingContext) => void
15+
className?: string;
1416
}
1517

1618
const Canvas = forwardRef<HTMLCanvasElement, CanvasProps<any>>(function Canvas<RenderingContext>(
1719
props: CanvasProps<RenderingContext>,
1820
ref: React.ForwardedRef<HTMLCanvasElement>
1921
) {
20-
const { height = 250, onDraw, prepareRenderingContext } = props;
22+
const { height = 250, onDraw, prepareRenderingContext, className } = props;
2123

2224
const canvasWrapperRef = useRef<HTMLDivElement>(null);
2325
const canvasRef = useRef<HTMLCanvasElement>(null);
@@ -82,7 +84,7 @@ const Canvas = forwardRef<HTMLCanvasElement, CanvasProps<any>>(function Canvas<R
8284

8385
return (
8486
<div ref={canvasWrapperRef}>
85-
<canvas className={styles.canvas} ref={setCanvasRef} width={width} height={height}></canvas>
87+
<canvas className={clsx(styles.canvas, className)} ref={setCanvasRef} width={width} height={height}></canvas>
8688
</div>
8789
);
8890
});

packages/audiodocs/src/components/Equalizer/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Canvas, { CanvasContext } from '../Canvas';
66
import AudioManager from '@site/src/audio/AudioManager';
77
import { clearCanvas, createGradient, drawEqGrid, drawShadedCurve, stretchFrequencies, getEqualizerResponse, getDrawingBounds, Point, drawEQControlPoints } from '@site/src/canvasUtils';
88
import useEqualizerControls from '@site/src/audio/useEqualizerControls';
9+
import styles from './styles.module.css';
910

1011
interface EqRenderingContext {
1112
analyser: AnalyserNode;
@@ -55,7 +56,7 @@ const Equalizer: React.FC = () => {
5556
}, [isPlaying, colorMode]);
5657

5758
return (
58-
<Canvas onDraw={onDraw} prepareRenderingContext={prepareRenderingContext} ref={canvasRef} />
59+
<Canvas onDraw={onDraw} prepareRenderingContext={prepareRenderingContext} ref={canvasRef} className={styles.canvas} />
5960
);
6061
};
6162

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
.canvas {
3+
cursor: pointer;
4+
}

packages/audiodocs/src/components/HireUsSection/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ export const HireUsSection = ({
2020
</h2>
2121
</div>
2222
<p className={styles.hireUsSectionBody}>
23-
{content ? (
24-
content
25-
) : (
26-
<>
27-
We’re a software company built around improving developer experience and bringing innovative clients' ideas to life. We're pushing boundaries and delivering high-performance solutions that scale.
28-
</>
29-
)}
23+
We’re a software company built around improving developer experience and bringing innovative clients' ideas to life. We're pushing boundaries and delivering high-performance solutions that scale.
24+
<br />< br />
25+
Need help integrating React Native Audio API into your project or want to discuss your ideas?
3026
</p>
3127

3228
<div className={styles.hireUsButton}>
3329
<HomepageButton
3430
href={href}
35-
title="Hire us"
31+
title="Let's talk"
3632
target="_blank"
3733
backgroundStyling={ButtonStyling.SECTION}
3834
borderStyling={BorderStyling.SECTION}

packages/audiodocs/src/components/LandingBlog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import styles from "./styles.module.css";
55

66
export default () => (
77
<section className={styles.container}>
8-
<h5 className={styles.title}>Discover the full potential of AudioAPI</h5>
8+
<h5 className={styles.title}>Learn more about React Native Audio API</h5>
99
<a href="https://medium.com/swmansion/hello-react-native-audio-api-bb0f10347211" target="_blank" className={styles.link}>
1010
See blog post
1111
<div className={styles.arrow}>

packages/audiodocs/src/components/Testimonials/TestimonialItem/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Props extends PropsWithChildren {
1717

1818
const TestimonialItem = ({ author, company, image, link, children }: Props) => {
1919
return (
20-
<a href={link} target="_blank" className={styles.testimonialItem}>
20+
<div className={styles.testimonialItem}>
2121
<QuoteIcon
2222
className={styles.quoteIcon}
2323
color={
@@ -32,11 +32,13 @@ const TestimonialItem = ({ author, company, image, link, children }: Props) => {
3232
</div>
3333
<div className={styles.testimonialAuthorInfo}>
3434
<h5 className={styles.testimonialAuthorName}>{author}</h5>
35-
<span className={styles.testimonialCompany}>{company}</span>
35+
<a href={link} target="_blank" rel="noopener noreferrer" className={styles.testimonialAuthorLink}>
36+
<span className={styles.testimonialCompany}>{company}</span>
37+
</a>
3638
</div>
3739
</div>
3840
<p className={styles.testimonialBody}>{children}</p>
39-
</a>
41+
</div>
4042
);
4143
};
4244

packages/audiodocs/src/components/Testimonials/TestimonialItem/styles.module.css

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
display: flex;
88
gap: 1rem;
99
flex-direction: column;
10-
/* max-width: calc(50% - 3.5rem / 2); */
1110
transition: 0.2s ease-in-out;
1211
}
1312

@@ -17,18 +16,6 @@
1716
min-height: 0;
1817
}
1918
}
20-
.testimonialItem:hover {
21-
text-decoration: none;
22-
background-color: var(--swm-red-light-40);
23-
box-shadow: -12px 12px 0px var(--swm-red-light-80);
24-
}
25-
26-
.testimonialItem:hover .testimonialAuthorPhoto {
27-
background-color: black;
28-
}
29-
.testimonialItem:hover .testimonialAuthorPhoto > img {
30-
opacity: 0.8;
31-
}
3219

3320
.testimonialBody {
3421
margin: 0;
@@ -52,10 +39,6 @@
5239
background-color: var(--swm-red-dark-140);
5340
box-shadow: -12px 12px 0px var(--swm-red-light-100);
5441
}
55-
[data-theme='dark'] .testimonialItem:hover {
56-
background-color: var(--swm-red-dark-120);
57-
box-shadow: -12px 12px 0px var(--swm-red-light-100);
58-
}
5942

6043
[data-theme='dark'] .testimonialAuthorName,
6144
[data-theme='dark'] .testimonialBody {

packages/audiodocs/src/components/Testimonials/TestimonialList/testimonials.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ const testimonials: Testimonial[] = [
1313
{
1414
author: 'Kim Chouard',
1515
company: 'Odisei Music',
16-
body: (
17-
<>
18-
<span>react-native-audio-api is a total game changer. It fills one of the biggest gaps in the React Native ecosystem by embracing what already works: the Web Audio API, making it universal and somehow even improving the Web in the process.</span>
19-
<br /> <br />
20-
<span>At Odisei Music, it powers all audio in Odisei Play, our saxophone learning app, where &lt;10ms latency isn’t a luxury, it’s a necessity. No other solution even came close.</span>
21-
<br /> <br />
22-
<span>This lib doesn’t just solve a problem, it unlocks a whole new category of apps for React Native devs.</span>
23-
</>
24-
),
16+
body: `React-native-audio-api is a total game changer – it fills one of the biggest gaps in the React Native ecosystem. At Odisei Music, it powers all audio in Odisei Play, our saxophone learning app, where <10ms latency isn’t a luxury, it’s a necessity. No other solution even came close. This lib doesn’t just solve a problem, it unlocks a whole new category of apps for React Native devs.`,
2517
link: 'https://odiseimusic.com/odisei-play/',
2618
image: {
2719
alt: 'Kim Chouard',

0 commit comments

Comments
 (0)