UNPKG

775 BSource Map (JSON)View Raw
1{"version":3,"names":["PreventRemoveContext","React","createContext","undefined"],"sources":["PreventRemoveContext.tsx"],"sourcesContent":["import * as React from 'react';\n\n/**\n * A type of an object that have a route key as an object key\n * and a value whether to prevent that route.\n */\nexport type PreventedRoutes = Record<string, { preventRemove: boolean }>;\n\nconst PreventRemoveContext = React.createContext<\n | {\n preventedRoutes: PreventedRoutes;\n setPreventRemove: (\n id: string,\n routeKey: string,\n preventRemove: boolean\n ) => void;\n }\n | undefined\n>(undefined);\n\nexport default PreventRemoveContext;\n"],"mappings":";;;;;;;AAAA;;;;;;AAQA,MAAMA,oBAAoB,gBAAGC,KAAK,CAACC,aAAN,CAU3BC,SAV2B,CAA7B;eAYeH,oB"}
\No newline at end of file