This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Meta, StoryObj } from '@storybook/react' | |
import { useState } from 'react' | |
import type { OutputData } from '@editorjs/editorjs' | |
import Editor from './Editor' | |
const meta: Meta<typeof Editor> = { | |
title: 'Components/Editor', | |
component: Editor, | |
tags: ['autodocs'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef, useState } from 'react' | |
function useAudioPlayer() { | |
const audioContextRef = useRef<AudioContext | null>(null) | |
const sourceRef = useRef<AudioBufferSourceNode | null>(null) | |
const [isPlaying, setIsPlaying] = useState<boolean>(false) | |
const [audioBlob, setAudioBlob] = useState<Blob | null>(null) | |
const [totalTime, setTotalTime] = useState<number>(0) | |
const createAudioSource = (): void => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MoreHorizontal } from 'lucide-react' | |
import { useState } from 'react' | |
import Link from 'next/link' | |
import type { MyResourceType } from '@shared/interfaces/my-resource' | |
import { | |
DropdownMenu, | |
DropdownMenuContent, | |
DropdownMenuItem, | |
DropdownMenuLabel, | |
DropdownMenuSeparator, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ReactNode } from 'react' | |
import { | |
Dialog, | |
DialogContent, | |
DialogDescription, | |
DialogFooter, | |
DialogHeader, | |
DialogTitle, | |
DialogTrigger, | |
} from '@/modules/design-system/primitives/Dialog' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Button } from '@/modules/design-system/primitives/Button' | |
import { deleteResourceById } from '@/modules/crud/queries/resource' | |
import { ValidationPanel } from '@/modules/design-system/components/SidePanel/SidePanel' | |
export interface ResourceDeletionProps { | |
resource: any | |
refetch: () => void | |
} |