-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from TClark1011:fix/remembered-sheets-mobile-…
…layout Fix/remembered-sheets-mobile-layout
- Loading branch information
Showing
12 changed files
with
321 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Box } from "@chakra-ui/react"; | ||
import { Container } from "@chakra-ui/react"; | ||
import React, { PropsWithChildren } from "react"; | ||
|
||
/** | ||
* Wrap the content of pages like 'info' and 'contact' | ||
* and apply consistent horizontal padding | ||
*/ | ||
const PageContentContainer: React.FC<PropsWithChildren> = ({ children }) => ( | ||
<Box paddingX={[0, 16, 32, 64, 96]}>{children}</Box> | ||
<Container centerContent>{children}</Container> | ||
); | ||
|
||
export default PageContentContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export { default as theme } from "./theme"; | ||
|
||
export * from "./env"; | ||
export * from "./publicEnv"; | ||
export * from "./options"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { | ||
Modal, | ||
ModalContent, | ||
ModalOverlay, | ||
Spinner, | ||
Text, | ||
} from "@chakra-ui/react"; | ||
import { atom, useAtomValue, useSetAtom } from "jotai"; | ||
import { FC, useEffect } from "react"; | ||
|
||
const isGlobalLoadingAtom = atom(false); | ||
const globalLoadingMessageAtom = atom<string | undefined>(undefined); | ||
|
||
/** | ||
* To use this, just call `useGlobalLoading` in your component, | ||
* passing in a boolean for whether or not the global loader should | ||
* be shown and an optional message to display. | ||
*/ | ||
export const useGlobalLoading = (isLoading: boolean, message?: string) => { | ||
const setIsLoading = useSetAtom(isGlobalLoadingAtom); | ||
const setMessage = useSetAtom(globalLoadingMessageAtom); | ||
|
||
useEffect(() => { | ||
setIsLoading(isLoading); | ||
setMessage(message); | ||
}, [isLoading, message, setIsLoading, setMessage]); | ||
|
||
useEffect(() => { | ||
return () => { | ||
setIsLoading(false); | ||
setMessage(undefined); | ||
}; | ||
}, [setIsLoading, setMessage]); | ||
}; | ||
|
||
/** | ||
* Place this in your `_app.tsx` file | ||
*/ | ||
export const GlobalLoader: FC = () => { | ||
const isLoading = useAtomValue(isGlobalLoadingAtom); | ||
const message = useAtomValue(globalLoadingMessageAtom); | ||
|
||
return ( | ||
<Modal | ||
isOpen={isLoading} | ||
onClose={() => {}} | ||
closeOnOverlayClick={false} | ||
isCentered | ||
autoFocus={false} | ||
> | ||
<ModalOverlay /> | ||
<ModalContent | ||
bg="transparent" | ||
border="none" | ||
display="flex" | ||
flexDirection="column" | ||
alignItems="center" | ||
> | ||
<Spinner | ||
size="xl" | ||
emptyColor="gray.200" | ||
color="primary.500" | ||
thickness="4px" | ||
/> | ||
{message && ( | ||
<Text fontWeight="bold" mt="group"> | ||
{message} | ||
</Text> | ||
)} | ||
</ModalContent> | ||
</Modal> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
904edcf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bag-of-holding – ./
bag-of-holding-git-main-tclark1011.vercel.app
bag-of-holding.vercel.app
bag-of-holding-tclark1011.vercel.app
bagofholding.cloud
www.bagofholding.cloud