From 22b2c0f1eafbf9eece794a7cd8f86ea538785ce9 Mon Sep 17 00:00:00 2001 From: Brendan F Date: Sun, 25 Jun 2023 20:32:40 -0700 Subject: Rename YouTube -> MiniYouTubePlayer to reduce confusion --- src/components/MiniYouTubePlayer/index.tsx | 24 ++++++++++++++++++++++++ src/components/Result/index.tsx | 6 +++--- src/components/YouTube/index.tsx | 24 ------------------------ src/components/index.ts | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 src/components/MiniYouTubePlayer/index.tsx delete mode 100644 src/components/YouTube/index.tsx (limited to 'src/components') diff --git a/src/components/MiniYouTubePlayer/index.tsx b/src/components/MiniYouTubePlayer/index.tsx new file mode 100644 index 0000000..0244524 --- /dev/null +++ b/src/components/MiniYouTubePlayer/index.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import { default as YouTubePlayer } from "react-youtube"; + +interface Props { + id: string; +} + +export function MiniYouTubePlayer({ id }: Props) { + return ( +
+ +
+ ); +} diff --git a/src/components/Result/index.tsx b/src/components/Result/index.tsx index 4aadbc6..2e1e03a 100644 --- a/src/components/Result/index.tsx +++ b/src/components/Result/index.tsx @@ -5,7 +5,7 @@ import { GuessType } from "../../types/guess"; import { scoreToEmoji } from "../../helpers"; import { Button } from "../Button"; -import { YouTube } from "../YouTube"; +import { MiniYouTubePlayer } from "../MiniYouTubePlayer"; import * as Styled from "./index.styled"; @@ -45,7 +45,7 @@ export function Result({ You guessed it in {currentTry} {currentTry === 1 ? 'try' : 'tries'}. - + @@ -61,7 +61,7 @@ export function Result({ Today's song is {todaysSolution.artist} - {todaysSolution.name} - + diff --git a/src/components/YouTube/index.tsx b/src/components/YouTube/index.tsx deleted file mode 100644 index 13ffeaa..0000000 --- a/src/components/YouTube/index.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react"; -import { default as YouTubePlayer } from "react-youtube"; - -interface Props { - id: string; -} - -export function YouTube({ id }: Props) { - return ( -
- -
- ); -} diff --git a/src/components/index.ts b/src/components/index.ts index 75672f3..0e97ada 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -4,7 +4,7 @@ export { Game } from "./Game"; export { Guess } from "./Guess"; export { Header } from "./Header"; export { InfoPopUp } from "./InfoPopUp"; +export { MiniYouTubePlayer} from "./MiniYouTubePlayer"; export { Player } from "./Player"; export { Result } from "./Result"; export { Search } from "./Search"; -export { YouTube } from "./YouTube"; -- cgit v1.2.3