@campxdev/shared 1.10.87 → 1.10.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.10.87",
3
+ "version": "1.10.89",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -169,6 +169,8 @@ export function UnAuth({ resetBoundary }) {
169
169
  const isLocalHost =
170
170
  process.env.NODE_ENV === 'development' ||
171
171
  origin?.slice(-2).join('.') === 'campx.dev'
172
+ const isSetup = window.location.hostname.split('.').includes('setup')
173
+ console.log('isSetup in error fallback', isSetup)
172
174
  const sessionCookie = Cookies.get('campx_session_key')
173
175
 
174
176
  const appinit = async () => {
@@ -212,7 +214,7 @@ export function UnAuth({ resetBoundary }) {
212
214
  }
213
215
 
214
216
  useEffect(() => {
215
- if (!isLocalHost) {
217
+ if (!isLocalHost && !isSetup) {
216
218
  window.location.replace(`https://www.id.campx.in/?redirect_to=${url}`)
217
219
  }
218
220
  }, [isLocalHost])
@@ -28,7 +28,6 @@ export default function ExcelToJsonInput({ onChange }) {
28
28
  let json = tableToJson(input)
29
29
  onChange(json)
30
30
  }}
31
- placeholder="paste"
32
31
  contentEditable
33
32
  sx={{
34
33
  fontSize: '16px',
@@ -15,6 +15,7 @@ export interface TabsContainerProps {
15
15
  onTabChange?: (tabKey: string) => void
16
16
  tabUnderlineColor?: string
17
17
  tabMobileUnderlineColor?: string
18
+ currentTabIndex?: number
18
19
  }
19
20
 
20
21
  export default function TabsContainer({
@@ -24,15 +25,16 @@ export default function TabsContainer({
24
25
  onTabChange,
25
26
  tabUnderlineColor,
26
27
  tabMobileUnderlineColor,
28
+ currentTabIndex = 0,
27
29
  }: TabsContainerProps) {
28
- const [currentTab, setCurrentTab] = useState(tabs[0].key)
30
+ const [currentTab, setCurrentTab] = useState(tabs[currentTabIndex].key)
29
31
 
30
32
  const handleTabsChange = (_event: ChangeEvent<{}>, value: string): void => {
31
33
  setCurrentTab(value)
32
34
  onTabChange && onTabChange(value)
33
35
  }
34
36
  useEffect(() => {
35
- setCurrentTab(tabs[0].key)
37
+ setCurrentTab(tabs[currentTabIndex].key)
36
38
  }, [])
37
39
 
38
40
  return (