mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-16 20:59:27 +00:00
fix types
This commit is contained in:
@@ -2,7 +2,6 @@ import { Link } from 'react-router-dom'
|
|||||||
|
|
||||||
import { Edit2Outline, PlayCircleOutline, TrashOutline } from '@/assets'
|
import { Edit2Outline, PlayCircleOutline, TrashOutline } from '@/assets'
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Column,
|
Column,
|
||||||
Table,
|
Table,
|
||||||
TableBody,
|
TableBody,
|
||||||
@@ -15,6 +14,7 @@ import { Deck } from '@/services/decks'
|
|||||||
import { formatDate } from '@/utils'
|
import { formatDate } from '@/utils'
|
||||||
|
|
||||||
import s from './decks-table.module.scss'
|
import s from './decks-table.module.scss'
|
||||||
|
|
||||||
const columns: Column[] = [
|
const columns: Column[] = [
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
@@ -64,17 +64,17 @@ export const DecksTable = ({ currentUserId, decks, onDeleteClick, onEditClick }:
|
|||||||
<TableCell>{deck.author.name}</TableCell>
|
<TableCell>{deck.author.name}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<div className={s.iconsContainer}>
|
<div className={s.iconsContainer}>
|
||||||
<Button as={Link} to={`/decks/${deck.id}/learn`} variant={'icon'}>
|
<Link to={`/decks/${deck.id}/learn`}>
|
||||||
<PlayCircleOutline />
|
<PlayCircleOutline />
|
||||||
</Button>
|
</Link>
|
||||||
{deck.author.id === currentUserId && (
|
{deck.author.id === currentUserId && (
|
||||||
<>
|
<>
|
||||||
<Button onClick={handleEditClick(deck.id)} variant={'icon'}>
|
<button onClick={handleEditClick(deck.id)}>
|
||||||
<Edit2Outline />
|
<Edit2Outline />
|
||||||
</Button>
|
</button>
|
||||||
<Button onClick={handleDeleteClick(deck.id)} variant={'icon'}>
|
<button onClick={handleDeleteClick(deck.id)}>
|
||||||
<TrashOutline />
|
<TrashOutline />
|
||||||
</Button>
|
</button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const HeaderDropdown: Story = {
|
|||||||
render: () => (
|
render: () => (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button rounded variant={'icon'}>
|
<Button>
|
||||||
<Avatar src={'https://avatars.githubusercontent.com/u/1196870?v=4'} />
|
<Avatar src={'https://avatars.githubusercontent.com/u/1196870?v=4'} />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
|||||||
Reference in New Issue
Block a user