Skip to content

Commit

Permalink
fix: import select
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan-helmy committed Jul 21, 2023
1 parent 4955a7b commit 9ad5446
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/components/AddSurauForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
import dynamic from "next/dynamic";
import type { FC } from "react";
import React, { useEffect, useState } from "react";
import React, { useState } from "react";
import Image from "next/image";
import { api } from "../utils/api";
import AlertModal from "./shared/AlertModal";
Expand All @@ -16,13 +16,9 @@ import "@uploadthing/react/styles.css";
import StateSelect from "./shared/StateSelect";
import { generateCombination } from "../utils";
import DistrictSelect from "./shared/DistrictSelect";

const AsyncCreatableSelect = dynamic(
() => import("react-select/async-creatable"),
{
ssr: true,
}
);
const Select = dynamic(() => import("react-select"), {
ssr: true,
});

export type AddSurauFormProps = {
setOpen: (open: boolean) => void;
Expand Down Expand Up @@ -68,9 +64,7 @@ const AddSurauForm: FC<AddSurauFormProps> = ({ setOpen }) => {
const [qiblatDegree, setQiblatDegree] = useState(0);
const [qiblatInfoError, setQiblatInfoError] = useState("");

const Select = dynamic(() => import("react-select"), {
ssr: true,
});


const mall = api.surau.getMallOnDistrict.useQuery({
district_id: choosenDistrict,
Expand Down

0 comments on commit 9ad5446

Please sign in to comment.