File size: 449 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import type { useLocation } from 'react-router'

export const DRAWER_PREROUTE_SET = 'DRAWER_PREROUTE_SET'

export type SetDrawerPreRouteResponse = {
  type: typeof DRAWER_PREROUTE_SET
  data: {
    previousRoute: Partial<ReturnType<typeof useLocation>> | null
  }
}

export const setDrawerPreRoute = (data: {
  previousRoute: Partial<ReturnType<typeof useLocation>> | null
}): SetDrawerPreRouteResponse => ({
  type: DRAWER_PREROUTE_SET,
  data,
})