-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(mana): deprecate remarkMana.client
- Loading branch information
1 parent
6c53722
commit 2e6e395
Showing
8 changed files
with
29 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import { type FunctionComponent } from 'react'; | ||
import { type FunctionComponent, type PropsWithChildren } from 'react'; | ||
import { type ExtraProps } from 'react-markdown'; | ||
|
||
import { Mana } from '@/components/Mana/Mana'; | ||
|
||
type Props = ExtraProps & { | ||
pattern?: string; | ||
}; | ||
type Props = ExtraProps & PropsWithChildren & { pattern?: string }; | ||
|
||
export const RemarkMana: FunctionComponent<Props> = ({ node, pattern }) => { | ||
export const RemarkMana: FunctionComponent<Props> = ({ | ||
children, | ||
node, | ||
pattern, | ||
}) => { | ||
if (!pattern) { | ||
console.error('Missing pattern in mana', node); | ||
return null; | ||
return children; | ||
} | ||
return <Mana pattern={pattern.toLowerCase()} />; | ||
return <Mana pattern={pattern} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters