diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 6006c43..5d51264 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -21,13 +21,13 @@ jobs: - name: Build env: - REACT_APP_SB_API_URL: ${{ secrets.REACT_APP_API_URL }} - REACT_APP_SB_API_TOKEN: ${{ secrets.REACT_APP_API_TOKEN }} + REACT_APP_SB_API_URL: ${{ secrets.REACT_APP_SB_API_URL }} + REACT_APP_SB_API_TOKEN: ${{ secrets.REACT_APP_SB_API_TOKEN }} REACT_APP_GA4_TRACKING_ID: ${{ secrets.REACT_APP_GA4_TRACKING_ID }} REACT_APP_GA4_MEASUREMENT_ID: ${{ secrets.REACT_APP_GA4_MEASUREMENT_ID }} - REACT_APP_FEEDBACK_URL: $ {{ secrets.REACT_APP_FEEDBACK_URL }} - + REACT_APP_FEEDBACK_URL: ${{ secrets.REACT_APP_FEEDBACK_URL }} run: CI=false npm run build + - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/src/components/SamplePhrases/index.js b/src/components/SamplePhrases/index.js index 8ab76e0..daa98db 100644 --- a/src/components/SamplePhrases/index.js +++ b/src/components/SamplePhrases/index.js @@ -1,72 +1,75 @@ -import {PhraseList, PhraseListItem, SamplePhrasesAccordion} from "./SamplePhrases.styles"; -import {Accordion, AccordionSummary, AccordionDetails} from '@mui/material'; -import {Tabs, Tab} from "@mui/material"; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; -import {useState} from "react"; -import {samplePhraseDict} from "../../constants"; +import { + PhraseList, + PhraseListItem, + SamplePhrasesAccordion, +} from "./SamplePhrases.styles"; +import { Accordion, AccordionSummary, AccordionDetails } from "@mui/material"; +import { Tabs, Tab } from "@mui/material"; +import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; +import { useState } from "react"; +import { samplePhraseDict } from "../../constants"; +const WordList = ({ sentences, setSamplePhrase }) => { + const onClick = (index) => { + setSamplePhrase(sentences[index]); + }; -const WordList = ({sentences, setSamplePhrase}) => { - - const onClick = (index) => { - setSamplePhrase(sentences[index]); - }; - - return ( - - {sentences.map((sentence, index) => ( - onClick(index)}> - {sentence} - - ))} - - ); + return ( + + {sentences.map((sentence, index) => ( + onClick(index)}> + {sentence} + + ))} + + ); }; - -const TabPanel = ({value, index, sentences, setSamplePhrase}) => ( -
- { - value === index && ( - - ) - } -
+const TabPanel = ({ value, index, sentences, setSamplePhrase }) => ( +
+ {value === index && ( + + )} +
); -const SamplePhrases = ({sourceLanguage, setSamplePhrase}) => { - - const [tab, setTab] = useState(0); +const SamplePhrases = ({ sourceLanguage, setSamplePhrase }) => { + const [tab, setTab] = useState(0); - const handleChange = (event, newTab) => { - setTab(newTab); - } + const handleChange = (event, newTab) => { + setTab(newTab); + }; - return ( - - - } - > -

Sample Phrases

-
- - - {samplePhraseDict[sourceLanguage].map((section, index) => )} - - {samplePhraseDict[sourceLanguage].map((section, index) => - - )} - -
-
- ) + return ( + + + }> +

Sample Phrases

+
+ + + {samplePhraseDict[sourceLanguage].map((section, index) => ( + + ))} + + {samplePhraseDict[sourceLanguage].map((section, index) => ( + + ))} + +
+
+ ); }; export default SamplePhrases;