generated from kevisual/vite-react-template
feat: refactor UI components and integrate new features
- Remove unused app.ts file. - Enhance Home component with CNB integration for user authentication. - Update root route to include Toaster component for notifications. - Add Avatar, Badge, Card, Dialog, Dropdown Menu, Input, Label, Select, Separator, Sonner, Table, and Tabs components for improved UI. - Create config page structure.
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
import { CNB, Issue } from '@kevisual/cnb/src/index.ts'
|
||||
import { useLayoutEffect } from 'react'
|
||||
const init2 = async () => {
|
||||
const cnb = new CNB({
|
||||
token: 'cIDfLOOIr1Trt15cdnwfndupEZG',
|
||||
cookie: 'CNBSESSION=1770014410.1935321989751226368.7f386c282d80efb5256180ef94c2865e20a8be72e2927a5f8eb1eb72142de39f;csrfkey=2028873452',
|
||||
cors: {
|
||||
baseUrl: 'https://cors.kevisual.cn'
|
||||
}
|
||||
})
|
||||
// const res = await cnb.issue.getList('kevisual/kevisual')
|
||||
// console.log('res', res)
|
||||
const token = await cnb.user.getCurrentUser()
|
||||
console.log('token', token)
|
||||
}
|
||||
export const Home = () => {
|
||||
useLayoutEffect(() => { init2() }, [])
|
||||
return <div>Home Page</div>
|
||||
}
|
||||
0
src/pages/config/index.tsx
Normal file
0
src/pages/config/index.tsx
Normal file
Reference in New Issue
Block a user