-
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.
- Loading branch information
1 parent
cb08835
commit 76d5ad3
Showing
15 changed files
with
138 additions
and
104 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,15 +1,13 @@ | ||
import createAsyncResourceBundle from 'lib/createAsyncResourceBundle'; | ||
import { Recipe } from 'types/Recipe'; | ||
import recipe1 from "./fixtures/recipe1.json" | ||
import recipe2 from "./fixtures/recipe2.json" | ||
import recipe1 from './fixtures/recipe1.json'; | ||
import recipe2 from './fixtures/recipe2.json'; | ||
|
||
type RecipesState = Recipe[]; | ||
|
||
export const { actions, reducer, selectors } = | ||
createAsyncResourceBundle<RecipesState>('recipes', { | ||
indexById: true, | ||
// Add stub data in the absence of proper search data. | ||
initialData: [ | ||
recipe1, recipe2 | ||
], | ||
initialData: [recipe1, recipe2], | ||
}); |
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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { CardTypes } from 'types/Collection'; | ||
export const CardTypesMap = { | ||
SNAP_LINK: 'snap-link', | ||
ARTICLE: 'article', | ||
RECIPE: 'recipe', | ||
} as const; | ||
|
||
export default { | ||
SNAP_LINK: 'SNAP_LINK', | ||
ARTICLE: 'ARTICLE', | ||
} as { [type: string]: CardTypes }; | ||
export type CardTypes = (typeof CardTypesMap)[keyof typeof CardTypesMap]; |
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.