Skip to content

Commit

Permalink
Change Choices component to astro component
Browse files Browse the repository at this point in the history
  • Loading branch information
brandstetterm committed Dec 6, 2023
1 parent 7bb4e03 commit b00887c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
20 changes: 8 additions & 12 deletions src/views/Choices/Choices.tsx → src/components/VideoPlayer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useState } from "react";
import ProgressButton from "../../components/ProgressButton";
import useMediaQuery from "../../hooks/useMediaQuery";
import Video from "../../components/Video";
import Icon from "../../components/Icon";
import "./Choices.scss";
import ProgressButton from "./ProgressButton";
import useMediaQuery from "../hooks/useMediaQuery";
import Video from "./Video";
import Icon from "./Icon";
import "../views/Choices/Choices.scss";

const Choices = () => {
const VideoPlayer = () => {
const [position, setPosition] = useState(0);
const theme = useMediaQuery("(prefers-color-scheme: dark)")
? "dark"
Expand Down Expand Up @@ -37,9 +37,6 @@ const Choices = () => {
}, [position, duration, isMobile]);

return (
<section className="choices" id="Features">
<h2>Euer Board – Eure Entscheidungen.</h2>
<p>Wählt eine beliebige Retrospektive, die zu eurem Team passt.</p>
<div className="choices__content">
<div className="choices__buttons">
<ProgressButton
Expand Down Expand Up @@ -136,8 +133,7 @@ const Choices = () => {
</ul>
</div>
</div>
</section>
);
};
}

export default Choices;
export default VideoPlayer;
4 changes: 2 additions & 2 deletions src/pages/[lang]/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import type { GetStaticPaths } from "astro";
import ReachNewHeights from "../../views/ReachNewHeights/ReachNewHeights.astro";
import Choices from "../../views/Choices/Choices";
import Choices from "../../views/Choices/Choices.astro";
import Uniqueness from "../../views/Uniqueness/Uniqueness.astro";
import Mobile from "../../views/Mobile/Mobile.astro";
import Layout from "../../layouts/Layout.astro";
Expand All @@ -20,7 +20,7 @@ export const getStaticPaths = (() => {

<Layout title="Scrumlr">
<ReachNewHeights />
<Choices client:visible />
<Choices />
<Uniqueness />
<Mobile />
<Features />
Expand Down
15 changes: 15 additions & 0 deletions src/views/Choices/Choices.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
import VideoPlayer from "../../components/VideoPlayer";
import getTranslatedContent from "../../utils/directus";
import "./Choices.scss";
const {lang} = Astro.params;
const content = await getTranslatedContent("Choices_Section", lang!);
---

<section class="choices" id="Features">
<h2>{content.header}</h2>
<p>{content.text}</p>
<VideoPlayer client:visible />
</section>

0 comments on commit b00887c

Please sign in to comment.