deleted unnecessary comments
This commit is contained in:
parent
d8e9eef8b1
commit
61f9add741
@ -1,13 +1,10 @@
|
|||||||
import React, { createContext, useContext, useEffect, useState } from "react";
|
import React, { createContext, useContext, useEffect, useState } from "react";
|
||||||
import { Dimensions } from "react-native";
|
import { Dimensions } from "react-native";
|
||||||
|
|
||||||
// Create the context
|
|
||||||
const OrientationContext = createContext();
|
const OrientationContext = createContext();
|
||||||
|
|
||||||
// Custom hook for consuming the context
|
|
||||||
export const useOrientation = () => useContext(OrientationContext);
|
export const useOrientation = () => useContext(OrientationContext);
|
||||||
|
|
||||||
// Provider component
|
|
||||||
export const OrientationProvider = ({ children }) => {
|
export const OrientationProvider = ({ children }) => {
|
||||||
const [orientation, setOrientation] = useState(getOrientation());
|
const [orientation, setOrientation] = useState(getOrientation());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user