Skip to content

Commit

Permalink
try different pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
llaenowyd committed Sep 24, 2023
1 parent 1392492 commit e033bf9
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 36 deletions.
7 changes: 1 addition & 6 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
{ }
12 changes: 6 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import { useRecoilValue } from "recoil";
import Frame from "components/Frame";
import Header from "components/Header";
import { VIEW_NAME_PASSAGE } from 'constants'
import state from "state";
import Passage from "views/Passage";
import WordsRunner from "views/WordsRunner";
import Frame from "./components/Frame";
import Header from "./components/Header";
import { VIEW_NAME_PASSAGE } from './constants'
import state from "./state";
import Passage from "./views/Passage";
import WordsRunner from "./views/WordsRunner";

function App() {
const viewName = useRecoilValue(state.viewName);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Controls/PlayPauseButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from "react";
import { useRecoilState } from "recoil";
import Button from 'components/Button'
import state from "state";
import state from "../../state";
import Button from '../Button'

const PlayPauseButton = () => {
const [isPlaying, setIsPlaying] = useRecoilState(state.isPlaying);
Expand Down
6 changes: 3 additions & 3 deletions src/components/Controls/ResetButton.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useCallback } from "react";
import { useSetRecoilState } from "recoil";
import Button from 'components/Button'
import state from "state";
import { VIEW_NAME_PASSAGE } from "constants";
import { VIEW_NAME_PASSAGE } from "../../constants";
import state from "../../state";
import Button from '../Button'

const ResetButton = () => {
const setIsPlaying = useSetRecoilState(state.isPlaying);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Controls/RestartButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from "react";
import { useSetRecoilState } from "recoil";
import Button from 'components/Button'
import state from "state";
import state from "../../state";
import Button from '../Button'

const RestartButton = () => {
const setIsPlaying = useSetRecoilState(state.isPlaying);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Controls/WpmControl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { useRecoilValue } from "recoil";
import tw from 'twin.macro';
import state from "state";
import state from "../../state";
import WpmSlider from "./WpmSlider";

const Row = tw.div`flex gap-2 items-center w-full bg-gray-100`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Controls/WpmSlider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useMemo } from "react";
import tw from 'twin.macro'
import { useRecoilState } from "recoil";
import state from "state";
import state from "../../state";

const SCALE = 50;
const MIN = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/components/PassageText.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useRecoilState } from 'recoil';
import TextArea from 'components/TextArea';
import state from 'state'
import state from '../state'
import TextArea from './TextArea';

const PassageText = () => {
const [passage, setPassage] = useRecoilState(state.passage)
Expand Down
4 changes: 2 additions & 2 deletions src/components/StartReadingButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react'
import { useSetRecoilState } from 'recoil'
import Button from 'components/Button'
import state from 'state'
import state from '../state'
import Button from './Button'

const StartReadingButton = () => {
const setViewName = useSetRecoilState(state.viewName)
Expand Down
2 changes: 1 addition & 1 deletion src/components/TimerEffect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useRef } from "react";
import { useRecoilValue, useSetRecoilState } from "recoil";
import state from "state";
import state from "../state";

const TimerEffect = () => {
const timeoutRef = useRef();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Word.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { useRecoilValue } from "recoil";
import tw from 'twin.macro'
import state from "state";
import state from "../state";

const Div = tw.div`text-6xl h-full bg-green-100 flex items-center justify-center`

Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { RecoilRoot } from "recoil";
import App from "App";
import GlobalStyles from "GlobalStyles";
import TimerEffect from "components/TimerEffect";
import reportWebVitals from "reportWebVitals";
import App from "./App";
import GlobalStyles from "./GlobalStyles";
import TimerEffect from "./components/TimerEffect";
import reportWebVitals from "./reportWebVitals";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
Expand Down
2 changes: 1 addition & 1 deletion src/state.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { atom, selector } from "recoil";
import { VIEW_NAME_PASSAGE, INITIAL_PASSAGE_TEXT } from 'constants'
import { VIEW_NAME_PASSAGE, INITIAL_PASSAGE_TEXT } from './constants'

const viewName = atom({
key: "viewName",
Expand Down
4 changes: 2 additions & 2 deletions src/views/Passage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import tw from 'twin.macro';
import PassageText from 'components/PassageText'
import StartReadingButton from 'components/StartReadingButton'
import PassageText from '../components/PassageText'
import StartReadingButton from '../components/StartReadingButton'
import 'styled-components/macro';

const Container = tw.div`flex flex-col flex-1 p-2 gap-2 bg-yellow-200`
Expand Down
4 changes: 2 additions & 2 deletions src/views/WordsRunner.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import tw from 'twin.macro';
import Controls from "components/Controls";
import Word from "components/Word";
import Controls from "../components/Controls";
import Word from "../components/Word";

const Stack = tw.div`flex flex-col gap-2 flex-1 bg-blue-100`

Expand Down

0 comments on commit e033bf9

Please sign in to comment.