Add meme-adding logic
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -21,7 +21,7 @@ interface DimensionsContext {
|
||||
orientation: 'portrait' | 'landscape';
|
||||
dimensions: ScaledSize;
|
||||
responsive: ScaleFunctions;
|
||||
static: ScaleFunctions;
|
||||
fixed: ScaleFunctions;
|
||||
}
|
||||
|
||||
const createScaleFunctions = (dimensionsIn: ScaledSize) => {
|
||||
@@ -56,7 +56,7 @@ const DimensionsProvider = ({ children }: { children: ReactNode }) => {
|
||||
}, []);
|
||||
|
||||
const responsiveScale = createScaleFunctions(dimensions);
|
||||
const staticScale = createScaleFunctions(initialDimensions);
|
||||
const fixedScale = createScaleFunctions(initialDimensions);
|
||||
|
||||
useEffect(() => {
|
||||
const onChange = ({ window }: { window: ScaledSize }) => {
|
||||
@@ -76,7 +76,7 @@ const DimensionsProvider = ({ children }: { children: ReactNode }) => {
|
||||
orientation,
|
||||
dimensions,
|
||||
responsive: responsiveScale,
|
||||
static: staticScale,
|
||||
fixed: fixedScale,
|
||||
}}>
|
||||
{children}
|
||||
</DimensionsContext.Provider>
|
||||
|
Reference in New Issue
Block a user