Skip to content

Commit ac32942

Browse files
committed
small fixes
1 parent d120e33 commit ac32942

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/Attribution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {Box, Text, Grommet} from 'grommet';
33
import ConfigContext from './ConfigContext';
44

55
export default function Attribution() {
6-
const {config: hideAttribution} = React.useContext(ConfigContext);
6+
const {config: {hideAttribution}} = React.useContext(ConfigContext);
77
if (hideAttribution) {
88
return null;
99
}

src/Embed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function GoogleMaps({uri, fallback}) {
274274
width="100%"
275275
height="360"
276276
style={{borderRadius: 8}}
277-
frameborder="0"
277+
frameBorder="0"
278278
allowFullScreen
279279
src={`https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d21948.472927059174!2d${encodeURIComponent(
280280
lng,

src/Post.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,12 +466,12 @@ export const ReactionBar = ({
466466

467467
export function slugify(s: string): string {
468468
return lowerCase(s)
469+
.trim()
469470
.replace(/\s+/g, '-') // Replace spaces with -
470471
.replace(/&/g, '-and-') // Replace & with 'and'
471472
.replace(/[^\w-]+/g, '') // Remove all non-word characters
472473
.replace(/--+/g, '-') // Replace multiple - with single -
473-
.trimStart() // Trim from start of text
474-
.trimEnd(); // Trim from end of text
474+
.trim();
475475
}
476476

477477
export function postPath({

src/lib/codeHighlight.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ export function fetchTokenInfo({
8585
},
8686
body: JSON.stringify({
8787
code,
88-
language: language,
89-
theme,
88+
settings: {
89+
language: language,
90+
theme,
91+
},
9092
}),
9193
});
9294
return resp

0 commit comments

Comments
 (0)