export const getCurrentSource = (routeSource?: string | string[]) => {
  const sessionSource = sessionStorage.getItem('LOGIN_SOURCE')

  if (sessionSource) {
    return sessionSource
  }

  if (Array.isArray(routeSource)) {
    return routeSource[0]
  }

  return routeSource || ''
}
