From 57d7282ead4cee346e17eb50d8e047c945221c66 Mon Sep 17 00:00:00 2001 From: Avik-creator Date: Fri, 15 Nov 2024 21:11:34 +0530 Subject: [PATCH] FEAT: Added Spacing Between the Selected Configuration. --- src/components/Installer/index.jsx | 70 ++++++++++++---------- src/components/Installer/styles.module.css | 15 +++++ 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 61053b0..f26bf60 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -1,54 +1,54 @@ -import React, { useState } from "react"; -import styles from "./styles.module.css"; +import React, { useState } from 'react'; +import styles from './styles.module.css'; export default function CondaInstallerSelector() { - const [os, setOs] = useState(""); - const [arch, setArch] = useState(""); - const [installerType, setInstallerType] = useState(""); + const [os, setOs] = useState(''); + const [arch, setArch] = useState(''); + const [installerType, setInstallerType] = useState(''); const osArchitectures = { - Linux: ["x64", "aarch64", "ppc64le"], - macOS: ["x64", "ARM64"], - Windows: ["x64", "ARM64 (Beta)"], + Linux: ['x64', 'aarch64', 'ppc64le'], + macOS: ['x64', 'ARM64'], + Windows: ['x64', 'ARM64 (Beta)'], }; const installerData = { Anaconda: { - name: "Anaconda Distribution", - url: "https://docs.anaconda.com/anaconda/install/index.html", - defaultChannel: "defaults", - description: "A Python/R data science distribution containing conda", + name: 'Anaconda Distribution', + url: 'https://docs.anaconda.com/anaconda/install/index.html', + defaultChannel: 'defaults', + description: 'A Python/R data science distribution containing conda', }, Miniconda: { - name: "Miniconda", - url: "https://docs.anaconda.com/miniconda/index.html", - defaultChannel: "defaults", - description: "Minimal installation of Anaconda Distribution", + name: 'Miniconda', + url: 'https://docs.anaconda.com/miniconda/index.html', + defaultChannel: 'defaults', + description: 'Minimal installation of Anaconda Distribution', }, Miniforge: { - name: "Miniforge", - url: "https://github.com/conda-forge/miniforge", - defaultChannel: "conda-forge", - description: "Community-driven minimal installer using conda-forge", + name: 'Miniforge', + url: 'https://github.com/conda-forge/miniforge', + defaultChannel: 'conda-forge', + description: 'Community-driven minimal installer using conda-forge', }, Micromamba: { - name: "Micromamba", - url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba", - defaultChannel: "conda-forge", - description: "Standalone fast package manager (no conda required)", + name: 'Micromamba', + url: 'https://mamba.readthedocs.io/en/latest/installation.html#micromamba', + defaultChannel: 'conda-forge', + description: 'Standalone fast package manager (no conda required)', isStandalone: true, }, Pixi: { - name: "Pixi", - url: "https://prefix.dev/docs/pixi/installation", - defaultChannel: "conda-forge", - description: "Modern package management solution for Python, C++, and R", + name: 'Pixi', + url: 'https://prefix.dev/docs/pixi/installation', + defaultChannel: 'conda-forge', + description: 'Modern package management solution for Python, C++, and R', isStandalone: true, }, }; const getInstallerDetails = () => { - if (!os || !installerType) { + if (!os || !installerType || !arch) { return null; } return installerData[installerType]; @@ -67,7 +67,7 @@ export default function CondaInstallerSelector() {