Skip to content

Commit 4aa168b

Browse files
committed
fix: fix hooks folder
1 parent 535621c commit 4aa168b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/commands/add.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { additionalDeps } from "@/utils/additional-deps"
55
import { type Config, configManager, getWriteComponentPath } from "@/utils/config"
66
import { getPackageManager } from "@/utils/get-package-manager"
77
import { error, grayText, highlight, warn, warningText } from "@/utils/logging"
8-
import { getRepoUrlForComponent, getUtilsFolder } from "@/utils/repo"
8+
import { getRepoUrlForComponent, getHooksFolder } from "@/utils/repo"
99
import { checkbox } from "@inquirer/prompts"
1010
import chalk from "chalk"
1111
import ora from "ora"
@@ -137,7 +137,7 @@ export async function add(options: {
137137
)
138138

139139
if (!fs.existsSync(mediaQueryFile)) {
140-
const responseMediaQuery = await fetch(getUtilsFolder("use-media-query.ts"))
140+
const responseMediaQuery = await fetch(getHooksFolder("use-media-query.ts"))
141141
const fileContentMediaQuery = await responseMediaQuery.text()
142142

143143
await writeCodeFile(config, {

src/utils/repo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const getThemesRepoUrl = (gray: string): string => {
3535
*/
3636
export const getPrimitiveComponentUrl = () => {
3737
if (branchWorkingOn === "1.x") return getRepoUrlForComponent("primitive", "intentui")
38-
return `${REPO}/${BRANCH}/lib/primitive.tsx`
38+
return `${REPO}/${BRANCH}/lib/primitive.ts`
3939
}
4040

4141
/**
@@ -57,8 +57,8 @@ export const getRepoUrlForComponent = (componentName: string, type: "intentui" |
5757
* @param file
5858
* @returns string
5959
*/
60-
export const getUtilsFolder = (file: string): string => {
61-
const utils = `${REPO}/refs/heads/${BRANCH}/utils/${file}`
60+
export const getHooksFolder = (file: string): string => {
61+
const utils = `${REPO}/refs/heads/${BRANCH}/hooks/${file}`
6262
if (!utils) {
6363
throw new Error("REPO_URL environment variable is not set")
6464
}

0 commit comments

Comments
 (0)