Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: useContext API && add test case for prod
- Loading branch information
1 parent
64022e7
commit a4b790e
Showing
6 changed files
with
67 additions
and
32 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
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
import { | ||
ImageConfigComplete, | ||
imageConfigDefault, | ||
} from '../../server/image-config' | ||
|
||
export const RuntimeImageConfigContext = | ||
React.createContext<ImageConfigComplete>(imageConfigDefault) | ||
|
||
if (process.env.NODE_ENV !== 'production') { | ||
RuntimeImageConfigContext.displayName = 'RuntimeImageConfigContext' | ||
} |
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