Skip to content

Commit

Permalink
update azd init command to case non sensitive (#294)
Browse files Browse the repository at this point in the history
* case non sensitive

* same for card panel
  • Loading branch information
hemarina authored Jan 22, 2024
1 parent f128efd commit afc711e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions website/src/components/gallery/ShowcaseCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ function ShowcaseCard({ user }: { user: User }): JSX.Element {
const star = useBaseUrl("/img/Sparkle.svg");
const fire = useBaseUrl("/img/Fire.svg");
let azdInitCommand =
"azd init -t " + source.replace("https://github.com/", "");
if (azdInitCommand.includes("Azure-Samples/")) {
azdInitCommand = azdInitCommand.replace("Azure-Samples/", "");
"azd init -t " + source.replace("https://github.com/", "").toLowerCase();
if (azdInitCommand.includes("azure-samples/")) {
azdInitCommand = azdInitCommand.replace("azure-samples/", "");
}
let headerLogo = useBaseUrl("/img/Community.svg");
let headerText = "Community Authored";
Expand Down
8 changes: 5 additions & 3 deletions website/src/components/gallery/ShowcaseCardPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ export default function ShowcaseCardPanel({ user }: { user: User }) {
{ toggle: toggleIsPopupVisibleAzureCalculator },
] = useBoolean(true);

let templateURL = user.source.replace("https://github.com/", "");
if (templateURL.includes("Azure-Samples/")) {
templateURL = templateURL.replace("Azure-Samples/", "");
let templateURL = user.source
.replace("https://github.com/", "")
.toLowerCase();
if (templateURL.includes("azure-samples/")) {
templateURL = templateURL.replace("azure-samples/", "");
}
const azdInitCommand = "azd init -t " + templateURL;
let chevronSVG = useBaseUrl("/img/leftChevron.svg");
Expand Down

0 comments on commit afc711e

Please # to comment.