From 45c302943426b7337a7bbc390af330bb53e1fc78 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 8 Jul 2022 15:20:03 +1200 Subject: [PATCH] Change page naming scheme to ${word}Page --- App.tsx | 20 ++++++++++---------- Exercises.tsx => BestPage.tsx | 2 +- Home.tsx => HomePage.tsx | 2 +- Plans.tsx => PlanPage.tsx | 2 +- Settings.tsx => SettingsPage.tsx | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename Exercises.tsx => BestPage.tsx (97%) rename Home.tsx => HomePage.tsx (98%) rename Plans.tsx => PlanPage.tsx (98%) rename Settings.tsx => SettingsPage.tsx (98%) diff --git a/App.tsx b/App.tsx index 974d92c..3c991f9 100644 --- a/App.tsx +++ b/App.tsx @@ -15,17 +15,17 @@ import { import {SQLiteDatabase} from 'react-native-sqlite-storage'; import Ionicon from 'react-native-vector-icons/Ionicons'; import {createPlans, createSets, getDb} from './db'; -import Exercises from './Exercises'; -import Home from './Home'; -import Plans from './Plans'; -import Settings from './Settings'; +import BestPage from './BestPage'; +import HomePage from './HomePage'; +import PlanPage from './PlanPage'; +import SettingsPage from './SettingsPage'; const Tab = createMaterialTopTabNavigator(); export type RootStackParamList = { Home: {}; Settings: {}; - Exercises: {}; - Plans: {}; + Best: {}; + Plan: {}; }; export const DatabaseContext = React.createContext({} as any); @@ -64,10 +64,10 @@ const App = () => { {db && ( - - - - + + + + )} diff --git a/Exercises.tsx b/BestPage.tsx similarity index 97% rename from Exercises.tsx rename to BestPage.tsx index 3c3e95a..fef7d8d 100644 --- a/Exercises.tsx +++ b/BestPage.tsx @@ -4,7 +4,7 @@ import {List, Searchbar} from 'react-native-paper'; import {DatabaseContext} from './App'; import Exercise from './exercise'; -export default function Exercises() { +export default function BestPage() { const [exercises, setExercises] = useState([]); const [search, setSearch] = useState(''); const [refreshing, setRefresing] = useState(false); diff --git a/Home.tsx b/HomePage.tsx similarity index 98% rename from Home.tsx rename to HomePage.tsx index b3f2b57..f90111c 100644 --- a/Home.tsx +++ b/HomePage.tsx @@ -10,7 +10,7 @@ import SetItem from './SetItem'; const limit = 20; -export default function Home() { +export default function HomePage() { const [sets, setSets] = useState(); const [offset, setOffset] = useState(0); const [edit, setEdit] = useState(); diff --git a/Plans.tsx b/PlanPage.tsx similarity index 98% rename from Plans.tsx rename to PlanPage.tsx index 6e2d1ff..26e4549 100644 --- a/Plans.tsx +++ b/PlanPage.tsx @@ -7,7 +7,7 @@ import MassiveFab from './MassiveFab'; import {Plan} from './plan'; import PlanItem from './PlanItem'; -export default function Plans() { +export default function PlanPage() { const [search, setSearch] = useState(''); const [plans, setPlans] = useState([]); const [refreshing, setRefresing] = useState(false); diff --git a/Settings.tsx b/SettingsPage.tsx similarity index 98% rename from Settings.tsx rename to SettingsPage.tsx index 169a724..dd5707d 100644 --- a/Settings.tsx +++ b/SettingsPage.tsx @@ -5,7 +5,7 @@ import {Button, Snackbar, Switch, TextInput} from 'react-native-paper'; import {DatabaseContext} from './App'; import BatteryDialog from './BatteryDialog'; -export default function Settings() { +export default function SettingsPage() { const [minutes, setMinutes] = useState(''); const [seconds, setSeconds] = useState(''); const [alarmEnabled, setAlarmEnabled] = useState(false);