Skip to content

Commit

Permalink
feat: add snowfall effect to LayoutContent
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev committed Dec 17, 2024
1 parent 5b4bff8 commit 53b450f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
12 changes: 12 additions & 0 deletions client/app/layout-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import useGeneralStore from '@/stores/general';
import FullPageLoading from './components/FullPageLoading';
import useLanguageStore from '@/stores/language';
import ReportButtonProvider from '@/app/components/Providers/ReportButton';
import Snowfall from 'react-snowfall';

export default function RootLayoutContent({ children }) {
const language = useLanguageStore(state => state.language);
Expand All @@ -30,6 +31,17 @@ export default function RootLayoutContent({ children }) {

return (
<section key={language}>
<Snowfall
snowflakeCount={100}
speed={[0.5, 1]}
wind={[1, 4.5]}
radius={[0.5, 3]}
style={{
zIndex: 9999999,
position: 'fixed'
}}
/>

<Script
defer={true}
src={config.analytics.script}
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"react-markdown": "^9.0.1",
"react-medium-image-zoom": "^5.2.11",
"react-ripples": "^2.2.1",
"react-snowfall": "^2.2.0",
"react-syntax-highlighter": "^15.5.0",
"react-text-transition": "^3.1.0",
"react-twemoji": "^0.6.0",
Expand Down
26 changes: 23 additions & 3 deletions client/pnpm-lock.yaml

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

0 comments on commit 53b450f

Please sign in to comment.