Skip to content

Commit

Permalink
feature(Blog): adding and using shared component
Browse files Browse the repository at this point in the history
  • Loading branch information
xandjiji committed Apr 8, 2024
1 parent 74f406a commit eb984b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/exevo-pan/src/components/Atoms/Coupon.tsx
@@ -1,7 +1,7 @@
import clsx from 'clsx'
import { ExevoPanIcon } from 'assets/svgs'

export const Coupon = ({ coupon }: { coupon: string }) => (
export default ({ coupon }: { coupon: string }) => (
<div className="border-1 border-separator/60 flex items-center gap-4 rounded border-dashed py-3 px-4">
<ExevoPanIcon width={60} height={60} className="shrink-0" />

Expand Down
2 changes: 1 addition & 1 deletion apps/exevo-pan/src/components/Atoms/index.ts
Expand Up @@ -48,4 +48,4 @@ export { default as TextArea } from './TextArea'
export * as TibiaBlackjack from './TibiaBlackjack'
export { default as TimeInput } from './TimeInput'
export { default as TitledCard } from './TitledCard'
export * from './Coupon'
export { default as Coupon } from './Coupon'
9 changes: 5 additions & 4 deletions apps/exevo-pan/src/pages/blog/[slug].tsx
@@ -1,16 +1,16 @@
import { Post, Links, parseMarkdownSections } from 'modules/Blog'
import { Links, parseMarkdownSections, Post } from 'modules/Blog'
import { GetStaticPaths, GetStaticProps } from 'next'
import { useTranslations } from 'contexts/useTranslation'
import dynamic from 'next/dynamic'
import { serialize } from 'next-mdx-remote/serialize'
import { MDXRemote, MDXRemoteSerializeResult } from 'next-mdx-remote'
import matter from 'gray-matter'
import { buildUrl, buildPageTitle, loadRawSrc } from 'utils'
import { buildPageTitle, buildUrl, loadRawSrc } from 'utils'
import Head from 'next/head'
import { BlogClient, PreviewImageClient } from 'services'
import { Main } from 'templates'
import { routes, links } from 'Constants'
import { common, blog } from 'locales'
import { links, routes } from 'Constants'
import { blog, common } from 'locales'

const components = {
...Post.styles,
Expand Down Expand Up @@ -50,6 +50,7 @@ const components = {
() => import('modules/Blog/components/Post/custom/SampleToast'),
),
Pro: dynamic(() => import('modules/Blog/components/Post/custom/Pro')),
Coupon: dynamic(() => import('components/Atoms/Coupon')),
}

type Props = {
Expand Down

0 comments on commit eb984b5

Please sign in to comment.