Closed AVGVSTVS96 closed 4 months ago
Latest commit: |
afedbe5
|
Status: | ✅ Deploy successful! |
Preview URL: | https://52904a2d.astrosite-aid.pages.dev |
Branch Preview URL: | https://createusethemetogglehook.astrosite-aid.pages.dev |
Open the branch in Web Editor • VS Code • Insiders
Open Preview
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @AVGVSTVS96 and the rest of your teammates on Graphite
TL;DR
This PR introduces a new hook
useThemeToggle
and updates thetsconfig.json
.Create
useThemeToggle
hook using logic fromModeToggle
Add hooks directory and
@hooks
import alias totsconfig.json
What changed?
A new file
useThemeToggle.tsx
was added in the newsrc/hooks/
directory. This hook provides a reusabletoggleTheme
function that changes the theme between dark and light mode.The
tsconfig.json
is updated with an import alias for the new hooks directory.