This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
2525 possibilityUtilsPath ,
2626} from "@/utils/helpers"
2727import { error , grayText , highlight , info } from "@/utils/logging"
28- import { getRepoUrlForComponent } from "@/utils/repo"
28+ import { getPrimitiveComponentUrl } from "@/utils/repo"
2929import ora from "ora"
3030import stripJsonComments from "strip-json-comments"
3131
@@ -302,7 +302,7 @@ export async function init(flags: {
302302 } )
303303 } )
304304
305- const fileUrl = getRepoUrlForComponent ( "primitive" , "intentui" )
305+ const fileUrl = getPrimitiveComponentUrl ( )
306306 const response = await fetch ( fileUrl )
307307
308308 if ( ! response . ok ) throw new Error ( `Failed to fetch component: ${ response . statusText } ` )
Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ export const getThemesRepoUrl = (gray: string): string => {
2929 return selectedGray
3030}
3131
32+ /**
33+ * This function is used to get the URL for the primitive.tsx component
34+ * @returns string
35+ */
36+ export const getPrimitiveComponentUrl = ( ) => {
37+ if ( branchWorkingOn === "1.x" ) return getRepoUrlForComponent ( "primitive" , "intentui" )
38+ return `${ REPO } /${ BRANCH } /lib/primitive.tsx`
39+ }
40+
3241/**
3342 * This function is used to get the URL for a component
3443 * @param componentName string
You can’t perform that action at this time.
0 commit comments