Skip to content

Commit

Permalink
feat: show doctor website link in doctor page
Browse files Browse the repository at this point in the history
  • Loading branch information
Asuka109 committed Feb 20, 2024
1 parent 2633950 commit 6d1d540
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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)'] ??
Expand Down

0 comments on commit 6d1d540

Please sign in to comment.