Skip to content

Commit

Permalink
refactor!: remove deprecated OgImageDynamic and OgImageStatic com…
Browse files Browse the repository at this point in the history
…ponents
  • Loading branch information
harlan-zw committed Nov 30, 2023
1 parent 6e11c00 commit 850ca5b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 38 deletions.
3 changes: 0 additions & 3 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@ export default defineNuxtModule<ModuleOptions>({

nuxt.options.optimization.treeShake.composables.client['nuxt-og-image'] = []
;[
// deprecated
'Dynamic',
'Static',
// new
'index',
'Cached',
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/OgImage/Cached.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineComponent<OgImageOptions>({
name: 'OgImageCached',
async setup(_, { attrs }) {
if (import.meta.server)
await defineOgImageCached(attrs)
defineOgImageCached(attrs)

return () => null
},
Expand Down
16 changes: 0 additions & 16 deletions src/runtime/components/OgImage/Dynamic.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/runtime/components/OgImage/Screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineComponent<OgImageScreenshotOptions>({
async setup(_, { attrs }) {
// get attrs
if (import.meta.server)
await defineOgImageScreenshot(attrs)
defineOgImageScreenshot(attrs)

return () => null
},
Expand Down
16 changes: 0 additions & 16 deletions src/runtime/components/OgImage/Static.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/runtime/components/OgImage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineComponent<OgImageOptions>({
async setup(_, { attrs }) {
if (import.meta.server)
// just use defaults
await defineOgImage(attrs)
defineOgImage(attrs)

return () => null
},
Expand Down

0 comments on commit 850ca5b

Please sign in to comment.