Skip to content

Commit

Permalink
chore: temporary hidden import model (#3270)
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur authored Aug 6, 2024
1 parent 91c77ed commit db5d8ab
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions web/screens/HubScreen2/components/ModelSearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React, { useCallback, useState } from 'react'

import { Button, Input } from '@janhq/joi'
import { useSetAtom } from 'jotai'
import { ImportIcon, SearchIcon } from 'lucide-react'
import { SearchIcon } from 'lucide-react'
import { FoldersIcon } from 'lucide-react'
import { useDebouncedCallback } from 'use-debounce'

import { toaster } from '@/containers/Toast'

import { useGetHFRepoData } from '@/hooks/useGetHFRepoData'

import { setImportModelStageAtom } from '@/hooks/useImportModel'
// import { setImportModelStageAtom } from '@/hooks/useImportModel'

import { MainViewState, mainViewStateAtom } from '@/helpers/atoms/App.atom'
import {
Expand All @@ -28,7 +28,7 @@ const ModelSearchBar: React.FC<Props> = ({ onSearchChanged }) => {
const { getHfRepoData } = useGetHFRepoData()
const setMainViewState = useSetAtom(mainViewStateAtom)
const setSelectedSetting = useSetAtom(selectedSettingAtom)
const setImportModelStage = useSetAtom(setImportModelStageAtom)
// const setImportModelStage = useSetAtom(setImportModelStageAtom)

const setImportingHuggingFaceRepoData = useSetAtom(
importingHuggingFaceRepoDataAtom
Expand All @@ -37,9 +37,9 @@ const ModelSearchBar: React.FC<Props> = ({ onSearchChanged }) => {
importHuggingFaceModelStageAtom
)

const onImportModelClick = useCallback(() => {
setImportModelStage('SELECTING_MODEL')
}, [setImportModelStage])
// const onImportModelClick = useCallback(() => {
// setImportModelStage('SELECTING_MODEL')
// }, [setImportModelStage])

const debounced = useDebouncedCallback(async (searchText: string) => {
if (searchText.indexOf('/') === -1) {
Expand Down Expand Up @@ -97,14 +97,15 @@ const ModelSearchBar: React.FC<Props> = ({ onSearchChanged }) => {
<FoldersIcon size={16} />
<span>My models</span>
</Button>
<Button
{/* Temporary hidden button import model */}
{/* <Button
className="flex gap-2 bg-[hsla(var(--app-bg))] text-[hsla(var(--text-primary))]"
theme="ghost"
onClick={onImportModelClick}
>
<ImportIcon size={16} />
<span>Import model</span>
</Button>
</Button> */}
</div>
)
}
Expand Down

0 comments on commit db5d8ab

Please sign in to comment.