Skip to content

Commit

Permalink
move hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
michalparkola committed Sep 25, 2024
1 parent 9b15509 commit 255e264
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion screens/practice/EditablePracticeTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Text, TextInput, Pressable } from "react-native";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { savePracticeTitle } from "@/supabase/supabase-queries";
import { usePractice } from "@/hooks/usePractice";
import { usePractice } from "./usePractice";
import { gs } from "@/global-styles";

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion screens/practice/PracticeListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Link } from "expo-router";
import { Tables } from "@/supabase/database.types";
import PracticeGrid from "@/screens/practice/PracticeGrid";
import { AddPractice } from "./AddPractice";
import { usePractices } from "@/hooks/usePractices";
import { usePractices } from "@/screens/practice/usePractices";

import { gs } from "@/global-styles";

Expand Down
2 changes: 1 addition & 1 deletion hooks/usePractice.tsx → screens/practice/usePractice.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery, UseQueryResult } from "@tanstack/react-query";
import { getSupabasePracticeById } from "../supabase/supabase-queries";
import { getSupabasePracticeById } from "../../supabase/supabase-queries";
import { Tables } from "@/supabase/database.types";

export function usePractice(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useQuery, UseQueryResult } from "@tanstack/react-query";
import {
getSupabaseUserId,
getSupabasePractices,
} from "../supabase/supabase-queries";
} from "../../supabase/supabase-queries";
import { Tables } from "@/supabase/database.types";

export function usePractices(): UseQueryResult<Tables<"Practices">[]> {
Expand Down
2 changes: 1 addition & 1 deletion screens/programs/Programs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link } from "expo-router";
import { Tables } from "@/supabase/database.types";

import { usePrograms } from "@/hooks/usePrograms";
import { usePractices } from "@/hooks/usePractices";
import { usePractices } from "@/screens/practice/usePractices";
import { AddProgramToPractice } from "./AddProgram";

function groupProgramsByPractice(programs: Tables<"Programs">[]) {
Expand Down

0 comments on commit 255e264

Please sign in to comment.