Skip to content

Commit

Permalink
move stores
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael committed Sep 22, 2024
1 parent ed0553d commit e0d80a0
Show file tree
Hide file tree
Showing 10 changed files with 217 additions and 379 deletions.
498 changes: 208 additions & 290 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import Header from "./lib/Header.svelte";
import Overview from "./lib/Overview.svelte";
import {CurrentWorkout} from './stores/stores'
import {CurrentWorkout} from './stores'
import Workout from "./lib/Workout.svelte";
import Results from "./lib/Results.svelte";
</script>
Expand Down
80 changes: 0 additions & 80 deletions src/app.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/classes/AppFlow.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Workout, CreateWorkout } from "./Workout";
import { CurrentWorkout, AmountOfNumbers, AmountOfQuestions, NumberLength, UsePlus, UseMinus, UseMultiply } from "../stores/stores";
import { CurrentWorkout, AmountOfNumbers, AmountOfQuestions, NumberLength, UsePlus, UseMinus, UseMultiply } from "../stores";
import { Settings } from "./Settings";
let amountOfQuestions = 10;
let amountOfNumbers = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Cards/Settings.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { AmountOfQuestions, AmountOfNumbers, NumberLength, UseMultiply, UsePlus, UseMinus } from "../../stores/stores";
import { AmountOfQuestions, AmountOfNumbers, NumberLength, UseMultiply, UsePlus, UseMinus } from "../../stores";
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Cards/Stats.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Workouts } from "../../stores/stores";
import { Workouts } from "../../stores";
let totalWorkouts = 0;
let totalQuestions = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Header.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { CurrentWorkout } from "../stores/stores";
import { CurrentWorkout } from "../stores";
import { StartNewWorkout } from "../classes/AppFlow";
function toMainScreen(){
CurrentWorkout.set(null);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Results.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { CurrentWorkout } from "../stores/stores";
import { CurrentWorkout } from "../stores";
</script>

<div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Workout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { CurrentWorkout, Workouts } from "../stores/stores";
import { CurrentWorkout, Workouts } from "../stores";
import { Workout } from "../classes/Workout";
import QuestionComponent from "./Question.svelte";
let workout: Workout;
Expand Down
4 changes: 2 additions & 2 deletions src/stores/stores.ts → src/stores.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writable } from "svelte/store";
import { Workout } from "../classes/Workout";
import { Question } from "../classes/Question";
import { Workout } from "./classes/Workout";
import { Question } from "./classes/Question";

export const Workouts = writable<Workout[]>([])

Expand Down

0 comments on commit e0d80a0

Please sign in to comment.