Merge pull request 'Fix nav param + rename to useRecordingDetails' (#132) from loewy/fix-nav-param into master

Reviewed-on: railbird/railbird-mobile#132
Reviewed-by: Kat Huang <kkathuang@gmail.com>
This commit is contained in:
loewy 2024-02-21 15:29:15 -07:00
commit 294198958d
3 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,7 @@ export default function CameraScreen({
const onMediaCaptured = useCallback( const onMediaCaptured = useCallback(
(media: PhotoFile | VideoFile) => { (media: PhotoFile | VideoFile) => {
console.log(`Media captured! ${JSON.stringify(media)}`); console.log(`Media captured! ${JSON.stringify(media)}`);
navigation.push("SaveVideo", { navigation.push("SaveRecording", {
videoId: uploadManager?.videoId, videoId: uploadManager?.videoId,
...params, ...params,
}); });

View File

@ -54,7 +54,7 @@ function useDropdown<T>(
}; };
} }
export const useVideoDetails = ({ export const useRecordingDetails = ({
params: { params: {
mode, mode,
videoId, videoId,

View File

@ -9,7 +9,7 @@ import {
View, View,
} from "react-native"; } from "react-native";
import DropDownPicker from "react-native-dropdown-picker"; import DropDownPicker from "react-native-dropdown-picker";
import { useVideoDetails } from "../../component/recording/use-recording-details"; import { useRecordingDetails } from "../../component/recording/use-recording-details";
import { globalInputStyles } from "../../styles"; import { globalInputStyles } from "../../styles";
import { recordStyles as styles } from "./styles"; import { recordStyles as styles } from "./styles";
@ -22,7 +22,7 @@ export default function VideoDetails({ navigation, route }): React.JSX.Element {
tableSize, tableSize,
handleSubmit, handleSubmit,
loading, loading,
} = useVideoDetails({ params: route.params, navigation }); } = useRecordingDetails({ params: route.params, navigation });
const dropDownStyles = { const dropDownStyles = {
style: globalInputStyles.dropdownStyle, style: globalInputStyles.dropdownStyle,