diff --git a/frontend/src/apis/garden.ts b/frontend/src/apis/garden.ts new file mode 100644 index 000000000..649b0a226 --- /dev/null +++ b/frontend/src/apis/garden.ts @@ -0,0 +1,23 @@ +import type { GardenRegisterForm } from 'types/garden'; +import { BASE_URL } from 'constants/index'; + +export const GARDEN_URL = `${BASE_URL}/garden`; + +const headers = { + 'Content-Type': 'application/json', +}; + +const register = (form: GardenRegisterForm) => { + return fetch(GARDEN_URL, { + method: 'POST', + headers, + credentials: 'include', + body: JSON.stringify(form), + }); +}; + +const GardenAPI = { + register, +}; + +export default GardenAPI; diff --git a/frontend/src/components/@common/InlineRadio/InlineRadio.stories.tsx b/frontend/src/components/@common/InlineRadio/InlineRadio.stories.tsx index 08ff7eb13..feaa81de3 100644 --- a/frontend/src/components/@common/InlineRadio/InlineRadio.stories.tsx +++ b/frontend/src/components/@common/InlineRadio/InlineRadio.stories.tsx @@ -22,8 +22,11 @@ const Wrapper = () => { return ( + | + | + | ); diff --git a/frontend/src/components/@common/InlineRadio/index.tsx b/frontend/src/components/@common/InlineRadio/index.ts similarity index 100% rename from frontend/src/components/@common/InlineRadio/index.tsx rename to frontend/src/components/@common/InlineRadio/index.ts diff --git a/frontend/src/components/@common/InlineRadio/ingredients/Main.style.ts b/frontend/src/components/@common/InlineRadio/ingredients/Main.style.ts index 62a335b09..862f2458f 100644 --- a/frontend/src/components/@common/InlineRadio/ingredients/Main.style.ts +++ b/frontend/src/components/@common/InlineRadio/ingredients/Main.style.ts @@ -4,8 +4,3 @@ export const Wrapper = styled.span` display: inline-flex; font-size: 1.8rem; `; - -export const Division = styled.p` - display: inline-flex; - align-items: center; -`; diff --git a/frontend/src/components/@common/InlineRadio/ingredients/Main.tsx b/frontend/src/components/@common/InlineRadio/ingredients/Main.tsx index b23b12990..ec25a7044 100644 --- a/frontend/src/components/@common/InlineRadio/ingredients/Main.tsx +++ b/frontend/src/components/@common/InlineRadio/ingredients/Main.tsx @@ -1,24 +1,12 @@ -import { Fragment } from 'react'; -import { Division, Wrapper } from './Main.style'; +import { Wrapper } from './Main.style'; import RadioProvider, { RadioProviderProps } from 'contexts/radioContext'; -import getFilteredChildren from 'utils/getFilteredChildren'; -import Option from './Option'; const Main = (props: RadioProviderProps) => { const { value, setValue, children, name } = props; - const options = getFilteredChildren(