Skip to content

Commit

Permalink
feat: faq 데이터 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
danah-kim committed Dec 1, 2024
1 parent 290a7a7 commit 06b2f90
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("상단 네비게이션", () => {

await userEvent.click(screen.getByRole("button", { name: /FAQ/ }));
expect(
await screen.findByText(/How to connect an external calendariCloudGoogleOutlook/i)
await screen.findByText(/If your iCloud Contacts, Calendars, or Reminders wont sync/i)
).toBeInTheDocument();
});

Expand Down
5 changes: 5 additions & 0 deletions src/assets/icons/outline/export_outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/outline/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as ShieldOutline } from "./shield-outline.svg";
export { default as ExportOutline } from "./export_outline.svg";
8 changes: 8 additions & 0 deletions src/pages/faq/_components/FagList/FagList.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ export const StyledFagList = styled.ul`
export const FagListItem = styled.li`
& button {
text-align: left;
color: ${({ theme }) => theme.palette.grey["700"]};
}
& button > svg {
min-width: fit-content;
}
`;

export const Bullet = styled.span`
min-width: 4px;
height: 4px;
border-radius: 50%;
background-color: ${({ theme: { palette } }) => palette.grey["700"]};
`;
42 changes: 23 additions & 19 deletions src/pages/faq/_components/FagList/FagList.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
import { Link } from "react-router-dom";
import { useTranslation } from "react-i18next";

import Button from "@components/atoms/Button";
import Icon from "@components/atoms/Icon";

import { FagListItem, StyledFagList } from "./FagList.styles";
import { matchSupportLanguage } from "@utils/i18n";

import { Bullet, FagListItem, StyledFagList } from "./FagList.styles";

function FagList() {
const { t, i18n } = useTranslation();
const fullLangCode = matchSupportLanguage(i18n.resolvedLanguage).fullLangCode;

return (
<StyledFagList>
<FagListItem>
<Link to="/faq/how-to-connect">
<Button variant="text" startIcon={<Icon name="DocumentBold" />}>
How to connect an external calendar(iCloud、Google、Outlook)
</Button>
</Link>
</FagListItem>
<FagListItem>
<Link to="/faq/how-to-connect">
<Button variant="text" startIcon={<Icon name="DocumentBold" />}>
How to change which calendars to show/hide
</Button>
</Link>
<Button
variant="text"
endIcon={<Icon name="ExportOutline" width={15} height={15} />}
onClick={() => window.open(`https://support.apple.com/${fullLangCode}/102543`)}
>
<Bullet />
{t("faq_apple_102543")}
</Button>
</FagListItem>
<FagListItem>
<Link to="/faq/how-to-connect">
<Button variant="text" startIcon={<Icon name="DocumentBold" />}>
How to change the displayed month
</Button>
</Link>
<Button
variant="text"
endIcon={<Icon name="ExportOutline" width={15} height={15} />}
onClick={() => window.open(`https://support.apple.com/${fullLangCode}/105124`)}
>
<Bullet />
{t("faq_apple_105124")}
</Button>
</FagListItem>
</StyledFagList>
);
Expand Down
20 changes: 0 additions & 20 deletions src/pages/faq/how-to-connect/page.tsx

This file was deleted.

0 comments on commit 06b2f90

Please sign in to comment.