diff --git a/App.tsx b/App.tsx
index edcbf78..9ae00f5 100644
--- a/App.tsx
+++ b/App.tsx
@@ -1,24 +1,14 @@
-import React, {useEffect} from 'react';
-import {SafeAreaView, ScrollView, StyleSheet, Text, View} from 'react-native';
-import {getStepsHistory} from './services/healthService';
+import React from 'react';
+import {SafeAreaView, ScrollView, StyleSheet} from 'react-native';
+import {Calendar} from './src/components/calendar';
const App = () => {
- useEffect(() => {
- (async function () {
- const steps = await getStepsHistory('2022-09-01', '2022-10-01');
-
- console.log(steps);
- })();
- });
-
return (
-
- Hello World !
-
+
);
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..e6ce677
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,113 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ CFPropertyList (3.0.7)
+ base64
+ nkf
+ rexml
+ activesupport (7.1.3)
+ base64
+ bigdecimal
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ connection_pool (>= 2.2.5)
+ drb
+ i18n (>= 1.6, < 2)
+ minitest (>= 5.1)
+ mutex_m
+ tzinfo (~> 2.0)
+ addressable (2.8.6)
+ public_suffix (>= 2.0.2, < 6.0)
+ algoliasearch (1.27.5)
+ httpclient (~> 2.8, >= 2.8.3)
+ json (>= 1.5.1)
+ atomos (0.1.3)
+ base64 (0.2.0)
+ bigdecimal (3.1.6)
+ claide (1.1.0)
+ cocoapods (1.15.2)
+ addressable (~> 2.8)
+ claide (>= 1.0.2, < 2.0)
+ cocoapods-core (= 1.15.2)
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
+ cocoapods-downloader (>= 2.1, < 3.0)
+ cocoapods-plugins (>= 1.0.0, < 2.0)
+ cocoapods-search (>= 1.0.0, < 2.0)
+ cocoapods-trunk (>= 1.6.0, < 2.0)
+ cocoapods-try (>= 1.1.0, < 2.0)
+ colored2 (~> 3.1)
+ escape (~> 0.0.4)
+ fourflusher (>= 2.3.0, < 3.0)
+ gh_inspector (~> 1.0)
+ molinillo (~> 0.8.0)
+ nap (~> 1.0)
+ ruby-macho (>= 2.3.0, < 3.0)
+ xcodeproj (>= 1.23.0, < 2.0)
+ cocoapods-core (1.15.2)
+ activesupport (>= 5.0, < 8)
+ addressable (~> 2.8)
+ algoliasearch (~> 1.0)
+ concurrent-ruby (~> 1.1)
+ fuzzy_match (~> 2.0.4)
+ nap (~> 1.0)
+ netrc (~> 0.11)
+ public_suffix (~> 4.0)
+ typhoeus (~> 1.0)
+ cocoapods-deintegrate (1.0.5)
+ cocoapods-downloader (2.1)
+ cocoapods-plugins (1.0.0)
+ nap
+ cocoapods-search (1.0.1)
+ cocoapods-trunk (1.6.0)
+ nap (>= 0.8, < 2.0)
+ netrc (~> 0.11)
+ cocoapods-try (1.2.0)
+ colored2 (3.1.2)
+ concurrent-ruby (1.2.3)
+ connection_pool (2.4.1)
+ drb (2.2.0)
+ ruby2_keywords
+ escape (0.0.4)
+ ethon (0.16.0)
+ ffi (>= 1.15.0)
+ ffi (1.16.3)
+ fourflusher (2.3.1)
+ fuzzy_match (2.0.4)
+ gh_inspector (1.1.3)
+ httpclient (2.8.3)
+ i18n (1.14.1)
+ concurrent-ruby (~> 1.0)
+ json (2.7.1)
+ minitest (5.22.2)
+ molinillo (0.8.0)
+ mutex_m (0.2.0)
+ nanaimo (0.3.0)
+ nap (1.1.0)
+ netrc (0.11.0)
+ nkf (0.2.0)
+ public_suffix (4.0.7)
+ rexml (3.2.6)
+ ruby-macho (2.5.1)
+ ruby2_keywords (0.0.5)
+ typhoeus (1.4.1)
+ ethon (>= 0.9.0)
+ tzinfo (2.0.6)
+ concurrent-ruby (~> 1.0)
+ xcodeproj (1.24.0)
+ CFPropertyList (>= 2.3.3, < 4.0)
+ atomos (~> 0.1.3)
+ claide (>= 1.0.2, < 2.0)
+ colored2 (~> 3.1)
+ nanaimo (~> 0.3.0)
+ rexml (~> 3.2.4)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ cocoapods (~> 1.11, >= 1.11.2)
+
+RUBY VERSION
+ ruby 2.7.5p203
+
+BUNDLED WITH
+ 2.1.4
diff --git a/assets/left-arrow.png b/assets/left-arrow.png
new file mode 100644
index 0000000..746e093
Binary files /dev/null and b/assets/left-arrow.png differ
diff --git a/assets/right-arrow.png b/assets/right-arrow.png
new file mode 100644
index 0000000..e49ea92
Binary files /dev/null and b/assets/right-arrow.png differ
diff --git a/ios/AppHomework.xcodeproj/project.pbxproj b/ios/AppHomework.xcodeproj/project.pbxproj
index 3c9eb7c..c42b326 100644
--- a/ios/AppHomework.xcodeproj/project.pbxproj
+++ b/ios/AppHomework.xcodeproj/project.pbxproj
@@ -8,13 +8,13 @@
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* AppHomeworkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* AppHomeworkTests.m */; };
- 0C80B921A6F3F58F76C31292 /* libPods-AppHomework.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-AppHomework.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
- 7699B88040F8A987B510C191 /* libPods-AppHomework-AppHomeworkTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AppHomework-AppHomeworkTests.a */; };
+ 2E93D9ED4C8DC285E1DC1349 /* libPods-AppHomework-AppHomeworkTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE157202DB93A1652BE0B58E /* libPods-AppHomework-AppHomeworkTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
F97ECD2B29028E7900B09718 /* hermes.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F97ECD2A29028E7900B09718 /* hermes.xcframework */; };
+ FA1D9C907681B664C16BD0CF /* libPods-AppHomework.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B9814E3190481A16C474ABF4 /* libPods-AppHomework.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -37,14 +37,14 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AppHomework/Images.xcassets; sourceTree = ""; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = AppHomework/Info.plist; sourceTree = ""; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AppHomework/main.m; sourceTree = ""; };
- 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AppHomework-AppHomeworkTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AppHomework-AppHomeworkTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
- 3B4392A12AC88292D35C810B /* Pods-AppHomework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework.debug.xcconfig"; path = "Target Support Files/Pods-AppHomework/Pods-AppHomework.debug.xcconfig"; sourceTree = ""; };
- 5709B34CF0A7D63546082F79 /* Pods-AppHomework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework.release.xcconfig"; path = "Target Support Files/Pods-AppHomework/Pods-AppHomework.release.xcconfig"; sourceTree = ""; };
- 5B7EB9410499542E8C5724F5 /* Pods-AppHomework-AppHomeworkTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework-AppHomeworkTests.debug.xcconfig"; path = "Target Support Files/Pods-AppHomework-AppHomeworkTests/Pods-AppHomework-AppHomeworkTests.debug.xcconfig"; sourceTree = ""; };
- 5DCACB8F33CDC322A6C60F78 /* libPods-AppHomework.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AppHomework.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 34AA7DCEA915D174063547DA /* Pods-AppHomework-AppHomeworkTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework-AppHomeworkTests.debug.xcconfig"; path = "Target Support Files/Pods-AppHomework-AppHomeworkTests/Pods-AppHomework-AppHomeworkTests.debug.xcconfig"; sourceTree = ""; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = AppHomework/LaunchScreen.storyboard; sourceTree = ""; };
- 89C6BE57DB24E9ADA2F236DE /* Pods-AppHomework-AppHomeworkTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework-AppHomeworkTests.release.xcconfig"; path = "Target Support Files/Pods-AppHomework-AppHomeworkTests/Pods-AppHomework-AppHomeworkTests.release.xcconfig"; sourceTree = ""; };
+ 8A114D396214B7366E293C4F /* Pods-AppHomework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework.debug.xcconfig"; path = "Target Support Files/Pods-AppHomework/Pods-AppHomework.debug.xcconfig"; sourceTree = ""; };
+ 9F69C6C140BD94A9878D1FC6 /* Pods-AppHomework-AppHomeworkTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework-AppHomeworkTests.release.xcconfig"; path = "Target Support Files/Pods-AppHomework-AppHomeworkTests/Pods-AppHomework-AppHomeworkTests.release.xcconfig"; sourceTree = ""; };
+ B9814E3190481A16C474ABF4 /* libPods-AppHomework.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AppHomework.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ D01E65D6313158ADD68DC617 /* Pods-AppHomework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppHomework.release.xcconfig"; path = "Target Support Files/Pods-AppHomework/Pods-AppHomework.release.xcconfig"; sourceTree = ""; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
+ EE157202DB93A1652BE0B58E /* libPods-AppHomework-AppHomeworkTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AppHomework-AppHomeworkTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F97ECD2A29028E7900B09718 /* hermes.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = hermes.xcframework; path = "Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework"; sourceTree = ""; };
/* End PBXFileReference section */
@@ -53,7 +53,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 7699B88040F8A987B510C191 /* libPods-AppHomework-AppHomeworkTests.a in Frameworks */,
+ 2E93D9ED4C8DC285E1DC1349 /* libPods-AppHomework-AppHomeworkTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -62,7 +62,7 @@
buildActionMask = 2147483647;
files = (
F97ECD2B29028E7900B09718 /* hermes.xcframework in Frameworks */,
- 0C80B921A6F3F58F76C31292 /* libPods-AppHomework.a in Frameworks */,
+ FA1D9C907681B664C16BD0CF /* libPods-AppHomework.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -104,8 +104,8 @@
children = (
F97ECD2A29028E7900B09718 /* hermes.xcframework */,
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
- 5DCACB8F33CDC322A6C60F78 /* libPods-AppHomework.a */,
- 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AppHomework-AppHomeworkTests.a */,
+ B9814E3190481A16C474ABF4 /* libPods-AppHomework.a */,
+ EE157202DB93A1652BE0B58E /* libPods-AppHomework-AppHomeworkTests.a */,
);
name = Frameworks;
sourceTree = "";
@@ -144,10 +144,10 @@
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
isa = PBXGroup;
children = (
- 3B4392A12AC88292D35C810B /* Pods-AppHomework.debug.xcconfig */,
- 5709B34CF0A7D63546082F79 /* Pods-AppHomework.release.xcconfig */,
- 5B7EB9410499542E8C5724F5 /* Pods-AppHomework-AppHomeworkTests.debug.xcconfig */,
- 89C6BE57DB24E9ADA2F236DE /* Pods-AppHomework-AppHomeworkTests.release.xcconfig */,
+ 8A114D396214B7366E293C4F /* Pods-AppHomework.debug.xcconfig */,
+ D01E65D6313158ADD68DC617 /* Pods-AppHomework.release.xcconfig */,
+ 34AA7DCEA915D174063547DA /* Pods-AppHomework-AppHomeworkTests.debug.xcconfig */,
+ 9F69C6C140BD94A9878D1FC6 /* Pods-AppHomework-AppHomeworkTests.release.xcconfig */,
);
path = Pods;
sourceTree = "";
@@ -159,12 +159,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "AppHomeworkTests" */;
buildPhases = (
- A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
+ 5C637A7925CEE6EAAE17EBC7 /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
- C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
- F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
+ 761D1B8432E2A656DBFFEFD5 /* [CP] Embed Pods Frameworks */,
+ EAB98FD2F6CC237354F2B731 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -180,14 +180,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "AppHomework" */;
buildPhases = (
- C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
+ 2033980FC3EF89D729D61F74 /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
- 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
- E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
+ 9C490DE72404DE236BB4D164 /* [CP] Embed Pods Frameworks */,
+ 3F795698EB55B5E097DCB31B /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -270,46 +270,46 @@
shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
};
- 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
+ 2033980FC3EF89D729D61F74 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- name = "[CP] Embed Pods Frameworks";
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-AppHomework-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-frameworks.sh\"\n";
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
- A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
+ 3F795698EB55B5E097DCB31B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-resources-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
+ name = "[CP] Copy Pods Resources";
outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-AppHomework-AppHomeworkTests-checkManifestLockResult.txt",
+ "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-resources.sh\"\n";
showEnvVarsInLog = 0;
};
- C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
+ 5C637A7925CEE6EAAE17EBC7 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -324,14 +324,14 @@
outputFileListPaths = (
);
outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-AppHomework-checkManifestLockResult.txt",
+ "$(DERIVED_FILE_DIR)/Pods-AppHomework-AppHomeworkTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
- C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
+ 761D1B8432E2A656DBFFEFD5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -348,24 +348,24 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppHomework-AppHomeworkTests/Pods-AppHomework-AppHomeworkTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
- E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
+ 9C490DE72404DE236BB4D164 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-resources-${CONFIGURATION}-input-files.xcfilelist",
+ "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- name = "[CP] Copy Pods Resources";
+ name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-resources-${CONFIGURATION}-output-files.xcfilelist",
+ "${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-resources.sh\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppHomework/Pods-AppHomework-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
- F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
+ EAB98FD2F6CC237354F2B731 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -434,7 +434,7 @@
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-AppHomework-AppHomeworkTests.debug.xcconfig */;
+ baseConfigurationReference = 34AA7DCEA915D174063547DA /* Pods-AppHomework-AppHomeworkTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -461,7 +461,7 @@
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-AppHomework-AppHomeworkTests.release.xcconfig */;
+ baseConfigurationReference = 9F69C6C140BD94A9878D1FC6 /* Pods-AppHomework-AppHomeworkTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
@@ -485,11 +485,12 @@
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-AppHomework.debug.xcconfig */;
+ baseConfigurationReference = 8A114D396214B7366E293C4F /* Pods-AppHomework.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = BGRFCW435U;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = AppHomework/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -511,11 +512,12 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-AppHomework.release.xcconfig */;
+ baseConfigurationReference = D01E65D6313158ADD68DC617 /* Pods-AppHomework.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = BGRFCW435U;
INFOPLIST_FILE = AppHomework/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
diff --git a/ios/AppHomework.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/AppHomework.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..0c67376
--- /dev/null
+++ b/ios/AppHomework.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/ios/Podfile b/ios/Podfile
index d4985de..8deebc8 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,6 +1,8 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
+IOS_VERSION = '12.4'
+
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
@@ -39,5 +41,21 @@ target 'AppHomework' do
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
+
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = IOS_VERSION
+ config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
+ config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
+ end
+
+ # Special case for 'RCT-Folly'
+ case target.name
+ when 'RCT-Folly'
+ target.build_configurations.each do |config|
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
+ end
+ end
+end
end
end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 559f058..d852090 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -368,7 +368,7 @@ PODS:
- React-jsi (= 0.70.3)
- React-logger (= 0.70.3)
- React-perflogger (= 0.70.3)
- - SocketRocket (0.6.0)
+ - SocketRocket (0.6.1)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
@@ -569,10 +569,10 @@ SPEC CHECKSUMS:
React-RCTVibration: b9a58ffdd18446f43d493a4b0ecd603ee86be847
React-runtimeexecutor: e9b1f9310158a1e265bcdfdfd8c62d6174b947a2
ReactCommon: 01064177e66d652192c661de899b1076da962fd9
- SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
+ SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 2ed968a4f060a92834227c036279f2736de0fce3
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
-PODFILE CHECKSUM: 5f52ba5d55551b4f0f4ab2f0f104d223ff78177b
+PODFILE CHECKSUM: fad904467f28af9ac847cef71055e85f7f21c0d7
-COCOAPODS: 1.11.2
+COCOAPODS: 1.15.2
diff --git a/src/Constants.ts b/src/Constants.ts
new file mode 100644
index 0000000..2ff24c2
--- /dev/null
+++ b/src/Constants.ts
@@ -0,0 +1,24 @@
+export const MONTHS_FR = [
+ 'Janvier',
+ 'Février',
+ 'Mars',
+ 'Avril',
+ 'Mai',
+ 'Juin',
+ 'Juillet',
+ 'Août',
+ 'Septembre',
+ 'Octobre',
+ 'Novembre',
+ 'Décembre',
+];
+
+export const WEEK_DAYS = [
+ 'Lun.',
+ 'Mar.',
+ 'Mer.',
+ 'Jeu.',
+ 'Ven.',
+ 'Sam.',
+ 'Dim.',
+];
diff --git a/src/components/calendar.tsx b/src/components/calendar.tsx
new file mode 100644
index 0000000..d7794b2
--- /dev/null
+++ b/src/components/calendar.tsx
@@ -0,0 +1,56 @@
+import React, {useCallback, useState, useMemo} from 'react';
+import {View} from 'react-native';
+import {CalendarHeader} from './calendarHeader';
+import moment from 'moment';
+import {CalendarDays} from './calendarDays';
+import {MONTHS_FR} from '../Constants';
+
+export const Calendar = () => {
+ const [currentDate, setCurrentDate] = useState(moment());
+
+ const firstCalendarDate = moment(currentDate)
+ .startOf('month')
+ .startOf('isoWeek');
+ const lastCalendarDate = moment(currentDate).endOf('month');
+
+ const monthArray = useMemo(() => {
+ const startWeekDate = firstCalendarDate.clone().subtract(1, 'day');
+ const calendarArray = [];
+ while (startWeekDate.isBefore(lastCalendarDate, 'day')) {
+ calendarArray.push(
+ Array(7)
+ .fill(0)
+ .map(() => startWeekDate.add(1, 'day').clone()),
+ );
+ }
+ return calendarArray;
+ }, [firstCalendarDate, lastCalendarDate]);
+
+ const onPressPreviousMonth = useCallback(() => {
+ setCurrentDate(moment(currentDate).subtract(1, 'month'));
+ }, [currentDate]);
+
+ const onPressNextMonth = useCallback(() => {
+ if (moment(currentDate).unix() >= moment().subtract(1, 'month').unix()) {
+ return;
+ }
+ setCurrentDate(moment(currentDate).add(1, 'month'));
+ }, [currentDate]);
+
+ const headerMonthName = useMemo(() => {
+ return `${MONTHS_FR[moment(currentDate).month()]} ${moment(
+ currentDate,
+ ).format('YYYY')} `;
+ }, [currentDate]);
+
+ return (
+
+
+
+
+ );
+};
diff --git a/src/components/calendarDays.tsx b/src/components/calendarDays.tsx
new file mode 100644
index 0000000..1a76927
--- /dev/null
+++ b/src/components/calendarDays.tsx
@@ -0,0 +1,174 @@
+import {View, Text, StyleSheet} from 'react-native';
+import React, {useState, useEffect} from 'react';
+import moment, {Moment} from 'moment';
+import {getStepsHistory} from '../../services/healthService';
+import {WEEK_DAYS} from '../Constants';
+
+interface ICalendarDaysProps {
+ currentDate: Moment;
+ monthArray: Moment[][];
+}
+
+interface IDayProps {
+ currentDate: Moment;
+ dayDate: Moment;
+ daySteps?: number;
+}
+
+const Day = ({currentDate, dayDate, daySteps}: IDayProps) => {
+ const isDayIsBeforeMonth = moment(dayDate).isBefore(
+ moment(currentDate).startOf('month'),
+ );
+ const isDayIsAfterEndMonth = moment(dayDate).isAfter(
+ moment(currentDate).endOf('month'),
+ );
+ const isFutureDay = moment(dayDate).isAfter(moment());
+
+ if (isDayIsBeforeMonth || isDayIsAfterEndMonth) {
+ return ;
+ }
+
+ return (
+
+
+ {moment(dayDate).format('D')}
+
+
+ {daySteps?.toLocaleString() || '-'}
+
+
+ );
+};
+
+export const CalendarDays = ({currentDate, monthArray}: ICalendarDaysProps) => {
+ const [monthSteps, setMonthSteps] = useState>({});
+ const [isLoading, setIsLoading] = useState(true);
+
+ useEffect(() => {
+ let isSubscribed = true;
+
+ const getSteps = async () => {
+ const firstDayOfMonth = moment(currentDate)
+ .startOf('month')
+ .format('YYYY-MM-DD');
+ const firstDayOfNextMonth = moment(currentDate)
+ .startOf('month')
+ .add(1, 'month')
+ .format('YYYY-MM-DD');
+ setIsLoading(true);
+ const stepsByMonth = await getStepsHistory(
+ firstDayOfMonth,
+ firstDayOfNextMonth,
+ );
+
+ if (isSubscribed) {
+ const refactoSteps = stepsByMonth
+ .map(x => ({
+ date: x.startDate.split('T')[0],
+ steps: x.value,
+ }))
+ .reduce>((acc, current) => {
+ const {date, steps} = current;
+ acc[date] = acc[date] ? acc[date] + steps : steps;
+ return acc;
+ }, {});
+
+ setMonthSteps(refactoSteps);
+ setIsLoading(false);
+ }
+ };
+ getSteps();
+ return () => {
+ isSubscribed = false;
+ };
+ }, [currentDate]);
+
+ if (monthArray.length < 1) {
+ return null;
+ }
+ return (
+
+
+ {WEEK_DAYS.map(weekDay => {
+ return (
+
+ {weekDay}
+
+ );
+ })}
+
+ {monthArray.map((week, index) => {
+ return (
+
+ {week.map(d => {
+ const daySteps =
+ monthSteps[moment(d).toISOString(true).split('T')[0]];
+ return (
+
+ );
+ })}
+
+ );
+ })}
+ {isLoading && (
+
+ Récupération des pas en cours ...
+
+ )}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ paddingVertical: 16,
+ },
+ weekDayContainer: {
+ flexDirection: 'row',
+ marginBottom: 10,
+ },
+ weekDayText: {
+ flex: 1,
+ textAlign: 'center',
+ fontWeight: '600',
+ color: '#687282',
+ },
+ weekContainer: {
+ flexDirection: 'row',
+ paddingVertical: 10,
+ },
+ emptyDay: {
+ flex: 1,
+ },
+ futureDay: {
+ color: '#ADB7C5',
+ },
+ day: {
+ textAlign: 'center',
+ fontSize: 11,
+ marginBottom: 8,
+ },
+ stepsDayContainer: {
+ flex: 1,
+ alignItems: 'center',
+ },
+ step: {
+ fontSize: 12,
+ fontWeight: '600',
+ color: '#EE8651',
+ },
+ emptyStep: {
+ display: 'none',
+ },
+ loadingText: {
+ marginTop: 24,
+ textAlign: 'center',
+ },
+});
diff --git a/src/components/calendarHeader.tsx b/src/components/calendarHeader.tsx
new file mode 100644
index 0000000..cd28f81
--- /dev/null
+++ b/src/components/calendarHeader.tsx
@@ -0,0 +1,62 @@
+import {View, Text, StyleSheet, TouchableOpacity, Image} from 'react-native';
+import React from 'react';
+
+interface ICalendarHeaderProps {
+ month: string;
+ onPressLeft: () => void;
+ onPressRight: () => void;
+}
+
+export const CalendarHeader = ({
+ month,
+ onPressLeft,
+ onPressRight,
+}: ICalendarHeaderProps) => {
+ return (
+ <>
+
+ {month}
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+const styles = StyleSheet.create({
+ monthContainer: {
+ flexDirection: 'row',
+ paddingLeft: 10,
+ paddingVertical: 32,
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ },
+ monthText: {
+ fontWeight: '600',
+ fontSize: 16,
+ },
+ arrowContainer: {
+ flexDirection: 'row',
+ },
+ arrow: {
+ width: 30,
+ height: 30,
+ },
+ separationLine: {
+ backgroundColor: '#BEC7D2',
+ height: 1,
+ },
+});