docs: general fixes and improvements (#7918)

* docs improvements and changes

* updated module definition

* modules + dml changes

* fix build

* fix vale error

* fix lint errors

* fixes to stripe docs

* fix condition

* fix condition

* fix module defintion

* fix checkout

* disable UI action

* change oas preview action

* flatten provider module options

* fix lint errors

* add module link docs

* pr comments fixes

* fix vale error

* change node engine version

* links -> linkable

* add note about database name

* small fixes

* link fixes

* fix response code in api reference

* added migrations step
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-07-04 17:26:03 +03:00
1 parent 32982e708a
commit 964927b597
149 files changed
+1676 -3008

No files matched your search

@@ -48,12 +48,23 @@ export const useRequestRunner = ({
replaceLog ? replaceLog(stringifiedData) : pushLog(stringifiedData)
})
.catch((error) => {
pushLog(
`An error ocurred: ${JSON.stringify(error, undefined, 2)}`,
`\nThis could be a CORS error. You can resolve it by adding\nthe docs' URLto your CORS configurations:\n`,
`STORE_CORS=http://localhost:8000,https://docs.medusajs.com`,
`ADMIN_CORS=http://localhost:7001,https://docs.medusajs.com`
)
pushLog(`\nAn error ocurred: ${JSON.stringify(error, undefined, 2)}`)
if (responseCode === "404") {
pushLog(
`\nPossible Solutions:\n`,
`- If this is a custom API route, make sure you added it at the correct path.`,
`- If this API route accepts any parameters, such as an ID, make sure it exists\nin the Medusa application.`
)
return
}
if (!responseCode.length) {
pushLog(
`\nThis could be a CORS error. You can resolve it by adding\nthe docs' URLto your CORS configurations:\n`,
`STORE_CORS=http://localhost:8000,https://docs.medusajs.com`,
`ADMIN_CORS=http://localhost:7001,https://docs.medusajs.com`
)
}
})
.finally(() => onFinish(`Finished running request.`, responseCode))
}
@@ -30,6 +30,9 @@ export function useTabs<T extends BaseTabType>({ tabs, group }: TabProps<T>) {
const scrollPosition = useRef<number>(0)
const changeSelectedTab = (tab: T) => {
if (tab.value === selectedTab?.value) {
return
}
scrollPosition.current = window.scrollY
setSelectedTab(tab)
localStorage.setItem(storageKey, tab.value)