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 {
25
25
possibilityUtilsPath ,
26
26
} from "@/utils/helpers"
27
27
import { error , grayText , highlight , info } from "@/utils/logging"
28
- import { getRepoUrlForComponent } from "@/utils/repo"
28
+ import { getPrimitiveComponentUrl } from "@/utils/repo"
29
29
import ora from "ora"
30
30
import stripJsonComments from "strip-json-comments"
31
31
@@ -302,7 +302,7 @@ export async function init(flags: {
302
302
} )
303
303
} )
304
304
305
- const fileUrl = getRepoUrlForComponent ( "primitive" , "intentui" )
305
+ const fileUrl = getPrimitiveComponentUrl ( )
306
306
const response = await fetch ( fileUrl )
307
307
308
308
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 => {
29
29
return selectedGray
30
30
}
31
31
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
+
32
41
/**
33
42
* This function is used to get the URL for a component
34
43
* @param componentName string
You can’t perform that action at this time.
0 commit comments