Skip to content

Commit

Permalink
wat2
Browse files Browse the repository at this point in the history
  • Loading branch information
grubersjoe committed Jan 26, 2025
1 parent 8cc956b commit 27bdf16
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 69 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@
}
</script>

<script type="module" crossorigin src="./assets/iframe-DTlr_DR5.js"></script>
<script type="module" crossorigin src="./assets/iframe-D8UZEQzQ.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/project.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"generatedAt":1737934894079,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"testPackages":{"@jest/globals":"29.7.0","@jest/types":"29.6.3","jest":"29.7.0","jest-environment-jsdom":"29.7.0"},"hasRouterPackage":false,"packageManager":{"type":"pnpm","version":"9.15.4"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":2,"applicationFileCount":0,"storybookVersion":"8.5.1","storybookVersionSpecifier":"^8.5.1","language":"typescript","storybookPackages":{"@storybook/addon-docs":{"version":"8.5.1"},"@storybook/blocks":{"version":"8.5.1"},"@storybook/builder-vite":{"version":"8.5.1"},"@storybook/react":{"version":"8.5.1"},"@storybook/react-vite":{"version":"8.5.1"},"@storybook/theming":{"version":"8.5.1"},"storybook":{"version":"8.5.1"}},"addons":{"@storybook/addon-essentials":{"options":{"actions":false},"version":"8.5.1"},"@storybook/addon-links":{"version":"8.5.1"},"storybook-dark-mode":{"version":"4.0.2"}}}
{"generatedAt":1737935083921,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"testPackages":{"@jest/globals":"29.7.0","@jest/types":"29.6.3","jest":"29.7.0","jest-environment-jsdom":"29.7.0"},"hasRouterPackage":false,"packageManager":{"type":"pnpm","version":"9.15.4"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":2,"applicationFileCount":0,"storybookVersion":"8.5.1","storybookVersionSpecifier":"^8.5.1","language":"typescript","storybookPackages":{"@storybook/addon-docs":{"version":"8.5.1"},"@storybook/blocks":{"version":"8.5.1"},"@storybook/builder-vite":{"version":"8.5.1"},"@storybook/react":{"version":"8.5.1"},"@storybook/react-vite":{"version":"8.5.1"},"@storybook/theming":{"version":"8.5.1"},"storybook":{"version":"8.5.1"}},"addons":{"@storybook/addon-essentials":{"options":{"actions":false},"version":"8.5.1"},"@storybook/addon-links":{"version":"8.5.1"},"storybook-dark-mode":{"version":"4.0.2"}}}
19 changes: 9 additions & 10 deletions src/component/ActivityCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
import { getYear, parseISO } from 'date-fns'
import { DEFAULT_LABELS, LABEL_MARGIN, NAMESPACE } from '../constants'
import { useColorScheme } from '../hooks/useColorScheme'
import { loadingAnimationName, useLoadingAnimation } from '../hooks/useLoadingAnimation'
import { usePrefersReducedMotion } from '../hooks/usePrefersReducedMotion'
import {
generateEmptyData,
Expand Down Expand Up @@ -208,7 +207,7 @@ export const ActivityCalendar = forwardRef<HTMLElement, Props>(
const colorScheme = colorSchemeProp ?? systemColorScheme
const colorScale = theme[colorScheme]

useLoadingAnimation(colorScale[0] as string, colorScheme)
// useLoadingAnimation(colorScale[0] as string, colorScheme)
const useAnimation = !usePrefersReducedMotion()

Check failure on line 211 in src/component/ActivityCalendar.tsx

View workflow job for this annotation

GitHub Actions / test

'useAnimation' is assigned a value but never used

if (loading) {
Expand Down Expand Up @@ -260,13 +259,13 @@ export const ActivityCalendar = forwardRef<HTMLElement, Props>(
return null
}

const loadingAnimation =
loading && useAnimation
? {
animation: `${loadingAnimationName} 1.75s ease-in-out infinite`,
animationDelay: `${weekIndex * 20 + dayIndex * 20}ms`,
}
: undefined
// const loadingAnimation =
// loading && useAnimation
// ? {
// animation: `${loadingAnimationName} 1.75s ease-in-out infinite`,
// animationDelay: `${weekIndex * 20 + dayIndex * 20}ms`,
// }
// : undefined

const block = (
<rect
Expand All @@ -280,7 +279,7 @@ export const ActivityCalendar = forwardRef<HTMLElement, Props>(
fill={colorScale[activity.level]}
data-date={activity.date}
data-level={activity.level}
style={{ ...styles.rect(colorScheme), ...loadingAnimation }}
style={{ ...styles.rect(colorScheme) }}
/>
)

Expand Down

0 comments on commit 27bdf16

Please sign in to comment.