From 6d1d54097f5424025e5c5d2e95f7b0dee7a2a54a Mon Sep 17 00:00:00 2001 From: chenwenjie Date: Tue, 20 Feb 2024 20:13:26 +0800 Subject: [PATCH] feat: show doctor website link in doctor page --- .../client/src/entries/client/routes/doctor/page.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/devtools/client/src/entries/client/routes/doctor/page.tsx b/packages/devtools/client/src/entries/client/routes/doctor/page.tsx index ade8a4b7c5ec..ec4678ddbc2e 100644 --- a/packages/devtools/client/src/entries/client/routes/doctor/page.tsx +++ b/packages/devtools/client/src/entries/client/routes/doctor/page.tsx @@ -20,7 +20,7 @@ import { import _ from 'lodash'; import { parseURL } from 'ufo'; import clsx from 'clsx'; -import { $dependencies } from '../state'; +import { $definition, $dependencies } from '../state'; import logo from './rsdoctor-large.png'; import { $doctor } from './state'; import styles from './page.module.scss'; @@ -79,11 +79,12 @@ const Page: FC = () => { const doctor = useSnapshot($doctor); const dependencies = useSnapshot($dependencies); + const def = useSnapshot($definition); const isWebDoctor = Object.keys(dependencies).find(key => key.startsWith('@web-doctor/'), ); const implementation = isWebDoctor ? 'Web Doctor' : 'Rsdoctor'; - const website = 'https://rsdoctor.dev'; + const { website } = def.doctor; const version = dependencies['@web-doctor/webpack-plugin(builder)'] ?? dependencies['@web-doctor/rspack-plugin(builder)'] ??