From 00bd41165259897538917e53f7a69ae73062b1c0 Mon Sep 17 00:00:00 2001 From: Mikey Stengel Date: Mon, 23 Dec 2024 00:30:32 +0100 Subject: [PATCH] fix(editor): Fix linter by removing unused code --- .../audio-serlo-static-renderer.tsx | 36 ------------------- .../src/plugins/audio/audio-recorder.tsx | 8 ----- 2 files changed, 44 deletions(-) delete mode 100644 apps/web/src/serlo-editor-integration/serlo-plugin-wrappers/audio-serlo-static-renderer.tsx diff --git a/apps/web/src/serlo-editor-integration/serlo-plugin-wrappers/audio-serlo-static-renderer.tsx b/apps/web/src/serlo-editor-integration/serlo-plugin-wrappers/audio-serlo-static-renderer.tsx deleted file mode 100644 index f5e9728487..0000000000 --- a/apps/web/src/serlo-editor-integration/serlo-plugin-wrappers/audio-serlo-static-renderer.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { - AudioRenderer, - getVocarooUrl, - parseAudioUrl, -} from '@editor/plugins/audio/renderer' -import { EditorAudioDocument } from '@editor/types/editor-plugins' -import dynamic from 'next/dynamic' - -import { Lazy } from '@/components/content/lazy' -import type { PrivacyWrapperProps } from '@/components/content/privacy-wrapper' -import { ExternalProvider } from '@/helper/use-consent' - -const PrivacyWrapper = dynamic(() => - import('@/components/content/privacy-wrapper').then( - (mod) => mod.PrivacyWrapper - ) -) - -export function AudioSerloStaticRenderer(props: EditorAudioDocument) { - const [src, type] = parseAudioUrl(props.state.src) - const vocarooUrl = getVocarooUrl(src) - - return ( - - - - -

[{vocarooUrl}]

-
- ) -} diff --git a/packages/editor/src/plugins/audio/audio-recorder.tsx b/packages/editor/src/plugins/audio/audio-recorder.tsx index 6d9e5565a0..8c8f451958 100644 --- a/packages/editor/src/plugins/audio/audio-recorder.tsx +++ b/packages/editor/src/plugins/audio/audio-recorder.tsx @@ -10,14 +10,6 @@ import { FaIcon } from '../../editor-ui/fa-icon' import { showToastNotice } from '../../editor-ui/show-toast-notice' import { FileState } from '../../plugin/upload' -// function getCurrentDateFormatted() { -// const today = new Date() -// const dd = String(today.getDate()).padStart(2, '0') -// const mm = String(today.getMonth() + 1).padStart(2, '0') -// const yyyy = today.getFullYear() -// return `${dd}_${mm}_${yyyy}` -// } - interface AudioRecorderProps { source: FileState setSource: (value: FileState) => void