Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf7e7aa

Browse files
committed
Update dependencies and some minor cleanup
1 parent6004251 commitdf7e7aa

File tree

3 files changed

+35
-51
lines changed

3 files changed

+35
-51
lines changed

‎package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name":"parquet-viewer",
33
"private":true,
4-
"version":"0.0.0",
4+
"version":"0.1.0",
55
"license":"MIT",
66
"type":"module",
77
"scripts": {
@@ -10,28 +10,27 @@
1010
"build":"tsc -b && vite build",
1111
"lint":"eslint .",
1212
"preview":"vite preview",
13-
"test":"vitest"
13+
"test":"vitest run"
1414
},
1515
"dependencies": {
16-
"@huggingface/hub":"0.21.0",
17-
"@hyparam/components":"0.1.10",
16+
"@huggingface/hub":"1.0.0",
17+
"@hyparam/components":"0.1.11",
1818
"react":"18.3.1",
1919
"react-dom":"18.3.1"
2020
},
2121
"devDependencies": {
22-
"@eslint/js":"9.16.0",
23-
"@types/react":"18.3.12",
22+
"@types/react":"18.3.18",
2423
"@types/react-dom":"18.3.1",
2524
"@vitejs/plugin-react":"4.3.4",
2625
"@vitest/coverage-v8":"2.1.8",
27-
"eslint":"9.16.0",
26+
"eslint":"9.17.0",
2827
"eslint-plugin-react":"7.37.2",
29-
"eslint-plugin-react-hooks":"5.0.0",
28+
"eslint-plugin-react-hooks":"5.1.0",
3029
"eslint-plugin-react-refresh":"0.4.16",
31-
"globals":"15.13.0",
30+
"globals":"15.14.0",
3231
"typescript":"5.7.2",
33-
"typescript-eslint":"8.17.0",
34-
"vite":"5.4.11",
32+
"typescript-eslint":"8.18.1",
33+
"vite":"6.0.4",
3534
"vitest":"2.1.8"
3635
}
3736
}

‎src/components/Home.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import Search from './Search.js'
99
* Home page
1010
*/
1111
exportdefaultfunctionHome({ auth}:{auth:OAuthResult|undefined}){
12+
//@ts-expect-error avatarUrl is real
13+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
14+
constavatarUrl:string|undefined=auth?.userInfo.avatarUrl
1215

1316
functiononUrlSubmit(event:FormEvent<HTMLFormElement>){
1417
event.preventDefault()
@@ -27,22 +30,26 @@ export default function Home({ auth }: { auth: OAuthResult | undefined }) {
2730

2831
<section>
2932
<h3>Select a dataset on Hugging Face</h3>
30-
{
31-
auth ?
32-
<p>Logged in as
33-
<imgsrc={auth.userInfo.avatarUrl}alt={auth.userInfo.name}style={{width:'1rem',height:'1rem',borderRadius:'50%',margin:'0 0.5rem'}}/>
34-
{auth.userInfo.name} (<aonClick={()=>{logout()}}>Log out</a>). You can search your private and gated datasets.</p>
35-
:<><p>Log in to search your private and gated datasets</p><p><a
36-
onClick={()=>{
37-
login().catch(()=>undefined)
38-
}}
39-
>
33+
{auth&&
34+
<p>Logged in as
35+
<imgsrc={avatarUrl}alt={auth.userInfo.name}className='avatar'/>
36+
{auth.userInfo.name} (<aonClick={logout}>Log out</a>).
37+
You can search your private and gated datasets.
38+
</p>
39+
}
40+
{!auth&&<>
41+
<p>Log in to search your private and gated datasets</p>
42+
<p>
43+
<aonClick={()=>{
44+
login().catch(()=>undefined)
45+
}}>
4046
<img
4147
src={HFLoginIcon}
4248
alt="Sign in with Hugging Face"
4349
/>
44-
</a></p></>
45-
}
50+
</a>
51+
</p>
52+
</>}
4653
<p>Search for dataset:</p>
4754
<SearchaccessToken={auth?.accessToken}></Search>
4855
</section>

‎src/styles/index.css

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -586,37 +586,15 @@ main {
586586
max-width:640px;
587587
margin:0 auto;
588588
}
589-
/* quick link buttons */
590-
.quick-links {
591-
display: flex;
592-
flex-wrap: wrap;
593-
gap:10px;
594-
list-style: none;
595-
}
596-
.quick-linksli {
597-
display: flex;
598-
flex:11calc(50%-10px);
599-
min-width:0;
600-
}
601-
.quick-linksa {
602-
background-position:10px center;
603-
background-size:18px;
604-
border:1px solid#444;
605-
border-radius:4px;
606-
font-size:8pt;
607-
overflow: hidden;
608-
padding:12px;
609-
padding-left:36px;
610-
text-overflow: ellipsis;
611-
white-space: nowrap;
612-
width:100%;
613-
}
614-
.quick-linksa:hover {
615-
background-color:#cec;
616-
}
617589
.huggingface {
618590
background:url('../assets/huggingface.svg') no-repeat8px center;
619591
}
592+
.avatar {
593+
width:1rem;
594+
height:1rem;
595+
border-radius:50%;
596+
margin:00.5rem;
597+
}
620598

621599
h1 {
622600
font-family:'Century Gothic','Helvetica Neue', Helvetica, Arial, sans-serif;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp