Skip to content

Commit

Permalink
Merge pull request #696 from Atom-Learning/fix/documentation-site-errors
Browse files Browse the repository at this point in the history
fix: revert to node-modules nodeLinker and old remark-gfm package
  • Loading branch information
thomasdigby authored Aug 28, 2024
2 parents 78fe117 + 3bf8a4e commit 67b8c8f
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 853 deletions.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodeLinker: 'pnpm'
nodeLinker: 'node-modules'
yarnPath: '.yarn/releases/yarn-berry.cjs'
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const Cards: React.FC<CardsProps> = ({
{showTagsFilter && (
<Box css={{ width: '100%', maxWidth: 750, mx: 'auto' }}>
<ChipToggleGroup
gap={2}
justify="center"
type="multiple"
value={selectedTags}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DosAndDontsItem: React.FC<TDosAndDontsItemProps> = ({
type === 'do' ? '$success' : type === 'dont' ? '$danger' : '$warning'
const typeText = type === 'do' ? 'Do' : type === 'dont' ? "Don't" : 'Avoid'
return (
<Tile as="li" css={{ listStyle: 'none' }}>
<Tile css={{ listStyle: 'none' }}>
<Box
css={{
background: '$base2',
Expand Down
2 changes: 1 addition & 1 deletion documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"react-immutable-proptypes": "^2.2.0",
"react-live": "3.1.2",
"react-select": "^4.0.0",
"remark-gfm": "^4.0.0",
"remark-gfm": "3.0.1",
"simple-oauth2": "^4.3.0",
"throttle-debounce": "^5.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@atom-learning/theme": "3.1.0",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@radix-ui/react-id": "0.1.5",
"@radix-ui/react-id": "1.0.1",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
Expand Down
4 changes: 3 additions & 1 deletion lib/src/utilities/hooks/useResizeObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ type TUseResizeObserverOptions = {

type TUseResizeObserverOutput = ResizeObserver | null

const createResizeObserver = (callback: () => void) => {
const createResizeObserver = (
callback: (entries: ResizeObserverEntry[]) => void
) => {
try {
return new ResizeObserver(callback)
} catch {
Expand Down
8 changes: 4 additions & 4 deletions lib/src/utilities/hooks/useScrollPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export const useScrollPosition = ({
}: TUseScrollPositionOptions): TUseScrollPositionOutput => {
const [scrollPosition, setScrollPosition] = useState({ left: 0, top: 0 })

const delayMethodFn = useMemo(() => {
if (delayMethod === 'throttle') return throttle
if (delayMethod === 'debounce') return debounce
}, [delayMethod])
const delayMethodFn = useMemo(
() => (delayMethod === 'debounce' ? debounce : throttle),
[delayMethod]
)

useEffect(() => {
if (!element) return
Expand Down
8 changes: 4 additions & 4 deletions lib/src/utilities/hooks/useWindowScrollPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const useWindowScrollPosition = ({
}: TUseWindowScrollPositionOptions = {}): TUseWindowScrollPositionOutput => {
const [scrollPosition, setScrollPosition] = useState({ x: 0, y: 0 })

const delayMethodFn = useMemo(() => {
if (delayMethod === 'throttle') return throttle
if (delayMethod === 'debounce') return debounce
}, [delayMethod])
const delayMethodFn = useMemo(
() => (delayMethod === 'debounce' ? debounce : throttle),
[delayMethod]
)

useEffect(() => {
const handleScroll = delayMethodFn(delay, () => {
Expand Down
Loading

0 comments on commit 67b8c8f

Please sign in to comment.