Skip to content

Commit

Permalink
- update .gitignore
Browse files Browse the repository at this point in the history
- update package.json with missing dependencies
- update package.json to use yarn
- add yarn.lock
- add .yarnrc.yml
- remove package-lock.json
- update HomePageLayoutsLayoutrsHeroLayout.jsx to pass keys explicitly
- update CoreQuote fragment to not error
  • Loading branch information
jasonbahl committed Aug 15, 2024
1 parent e958515 commit 2a86e30
Show file tree
Hide file tree
Showing 9 changed files with 13,070 additions and 18,185 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
.yarn/cache/
.yarn/unplugged/
.yarn/build-state.yml


# testing
/coverage
Expand Down
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-4.4.0.cjs
33 changes: 23 additions & 10 deletions components/HomepageLayoutsLayoutsHeroLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,29 @@ const HomepageLayoutsLayoutsHeroLayout = (hero) => {
style={style}
>
<code className="px-4">
{tokens.map((line, lineIndex) => (
<div key={lineIndex} {...getLineProps({ line })}>
{line.map((token, tokenIndex) => (
<span
key={tokenIndex}
{...getTokenProps({ token })}
/>
))}
</div>
))}
{tokens.map((line, lineIndex) => {

const lineProps = getLineProps({ line }) || {};
const linePropsKey = lineProps.key || lineIndex;
delete lineProps.key; // delete key to prevent React warning
return (
<div {...lineProps} key={linePropsKey}>
{line.map((token, tokenIndex) => {

const tokenProps = getTokenProps({ token }) || {};
const tokenPropsKey = tokenProps.key || tokenIndex;
delete tokenProps.key; // delete key to prevent React warning

return (
<span
key={tokenPropsKey}
{...tokenProps}
/>
)
})}
</div>
)}
)}
</code>
</pre>
)}
Expand Down
Loading

0 comments on commit 2a86e30

Please sign in to comment.