refactor: rename logic to composables
This commit is contained in:
1 parent
b9a1dd0772
commit
60a52456f1
4 files changed
+4
-5
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isDark, toggleDark } from '~/logic'
|
import { isDark, toggleDark } from '~/composables'
|
||||||
|
|
||||||
const { t, availableLocales, locale } = useI18n()
|
const { t, availableLocales, locale } = useI18n()
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// import { useDark, useToggle } from '@vueuse/core'
|
// these APIs are auto-imported from @vueuse/core
|
||||||
|
|
||||||
export const isDark = useDark()
|
export const isDark = useDark()
|
||||||
export const toggleDark = useToggle(isDark)
|
export const toggleDark = useToggle(isDark)
|
||||||
File renamed without changes.
+2
-2
@@ -10,11 +10,11 @@ Check out [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) f
|
|||||||
For example, instead of having
|
For example, instead of having
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { isDark } from '../../../../logic'
|
import { isDark } from '../../../../composables'
|
||||||
```
|
```
|
||||||
|
|
||||||
now, you can use
|
now, you can use
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { isDark } from '~/logic'
|
import { isDark } from '~/composables'
|
||||||
```
|
```
|
||||||
Reference in new issue
Block a user