docs: fix code block titles (#5733)

* docs: fix code block titles

* remove console

* fix build error
This commit is contained in:
Shahed Nasser
2023-11-27 16:08:10 +00:00
committed by GitHub
parent de8f748674
commit 547b16ead5
110 changed files with 483 additions and 456 deletions
+8 -8
View File
@@ -36,7 +36,7 @@ These changes may already be available in your Medusa project. They're included
First, update your `tsconfig.json` with the following configurations:
```json title=tsconfig.json
```json title="tsconfig.json"
{
"compilerOptions": {
"target": "es2019",
@@ -77,7 +77,7 @@ The addition of `"jsx": "react-jsx"` specified how should TypeScript transform J
Next, create the file `tsconfig.server.json` with the following content:
```json title=tsconfig.server.json
```json title="tsconfig.server.json"
{
"extends": "./tsconfig.json",
"compilerOptions": {
@@ -92,7 +92,7 @@ This is the configuration that will be used to transpile your custom backend cod
Finally, create the file `tsconfig.admin.json` with the following content:
```json title=tsconfig.admin.json
```json title="tsconfig.admin.json"
{
"extends": "./tsconfig.json",
"compilerOptions": {
@@ -131,7 +131,7 @@ For a setting page to be valid, it must default export a React component. There
For example, you can create the file `src/admin/settings/custom/page.tsx` with the following content:
```tsx title=src/admin/settings/custom/page.tsx
```tsx title="src/admin/settings/custom/page.tsx"
import type { SettingConfig } from "@medusajs/admin"
import { CustomIcon } from "../../icons/custom"
@@ -184,7 +184,7 @@ Every route receives props of the type `RouteProps`, which includes the `notify`
For example:
```tsx title=src/admin/settings/custom/page.tsx
```tsx title="src/admin/settings/custom/page.tsx"
import type { SettingConfig } from "@medusajs/admin"
import type { SettingProps } from "@medusajs/admin"
@@ -226,7 +226,7 @@ For example, to customize the style of your custom setting page:
<!-- eslint-disable max-len -->
```tsx title=src/admin/settings/custom/page.tsx
```tsx title="src/admin/settings/custom/page.tsx"
import type { SettingConfig } from "@medusajs/admin"
const CustomSettingPage = () => {
@@ -269,7 +269,7 @@ If you're installing it in a plugin with admin customizations, make sure to incl
For example, to add a link to another page:
```tsx title=src/admin/settings/custom/page.tsx
```tsx title="src/admin/settings/custom/page.tsx"
import type { SettingConfig } from "@medusajs/admin"
import { Link } from "react-router-dom"
@@ -310,7 +310,7 @@ Make sure to also install the Medusa React package first if youre intending t
For example, you can retrieve available products and display them in your route:
```tsx title=src/admin/settings/custom/page.tsx
```tsx title="src/admin/settings/custom/page.tsx"
import type { SettingConfig } from "@medusajs/admin"
import { useAdminProducts } from "medusa-react"