brilliant-orangeB
Refine2y ago
3 replies
brilliant-orange

The URL is duplicated.

export default function ManageList() {
  const { onFinish } = useForm<HttpError>({
    resource: 'manage',
    action: 'create',
  });

  const [membership, setMembership] = useState<ICustomerGroups[]>([]);
  const [membershipDetail, setMembershipDetail] =
    useState<ICustomerGroupDetailValues>({
      group_no: 0,
      group_name: '',
      term: {} as TermValues,
      first_event: 0,
      first_event_status: '',
    });

  useEffect(() => {
    const fetchData = async () => {
      try {
        const membership = await fetch(
          `${process.env.NEXT_PUBLIC_API_URL}/manage`,
          {
            headers: {
              'Content-Type': 'application/json',
              'ngrok-skip-browser-warning': '69420',
            },
          },
        );
        const detailData = await fetch(
          `${process.env.NEXT_PUBLIC_API_URL}/manage/detail`,
          {
            headers: {
              'Content-Type': 'application/json',
              'ngrok-skip-browser-warning': '69420',
            },
          },
        );


localhost is fine. But live development is duplication url.
https://alpha-admin.com/alpha-api.com/alpha-api.com/order?_end=10&_start=0
Was this page helpful?