Skip to content

Commit

Permalink
feat: remove mention of supported devices is quickstart dialog (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
boundlesscalm authored Oct 16, 2024
1 parent f2953b5 commit a4ad521
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions src/launcher/features/quickstart/QuickstartDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@

import React from 'react';
import {
deviceInfo,
DialogButton,
GenericDialog,
InstalledDownloadableApp,
} from '@nordicsemiconductor/pc-nrfconnect-shared';
import { parsePackageJsonApp } from '@nordicsemiconductor/pc-nrfconnect-shared/main';
import fs from 'fs';
import path from 'path';

import { useLauncherDispatch, useLauncherSelector } from '../../util/hooks';
import { getIsAppleSiliconDialogVisible } from '../appleSilicon/appleSiliconSlice';
Expand All @@ -25,35 +20,6 @@ import {
} from '../settings/settingsSlice';
import { getIsTelemetryDialogVisible } from '../telemetry/telemetrySlice';

const DEFAULT_SUPPORTED_DEVICES = ['pca10090', 'pca10153'];

const nameFor = (pcaNumber: string) =>
deviceInfo({
id: 0,
traits: {},
devkit: { boardVersion: pcaNumber },
}).name;

const packageJson = (quickStartApp?: InstalledDownloadableApp) => {
if (quickStartApp?.installed.path == null) {
return;
}

const packageJSONPath = path.join(
quickStartApp?.installed.path,
'package.json'
);

if (!fs.existsSync(packageJSONPath)) {
return undefined;
}

const parsed = parsePackageJsonApp(
fs.readFileSync(packageJSONPath, 'utf8')
);
return parsed.success ? parsed.data : undefined;
};

export default () => {
const isQuickStartInfoShownBefore = useLauncherSelector(
getIsQuickStartInfoShownBefore
Expand All @@ -76,10 +42,6 @@ export default () => {
!isAppleSiliconDialogVisible &&
quickStartApp != null;

const supportedDevices =
packageJson(quickStartApp)?.nrfConnectForDesktop?.supportedDevices ??
DEFAULT_SUPPORTED_DEVICES;

return (
<GenericDialog
isVisible={isVisible}
Expand Down Expand Up @@ -115,7 +77,6 @@ export default () => {
Do you have a new development kit? Use the Quick Start app to
get up and running as fast as possible.
</p>
<p>Supported kits: {supportedDevices.map(nameFor).join(', ')}.</p>
</GenericDialog>
);
};

0 comments on commit a4ad521

Please sign in to comment.