Skip to content

Commit cdfac05

Browse files
authored
refactor(web): convert terms and privacy policy styling from SCSS to CSS-in-JS (vspo-lab#681)
1 parent 9d8bce0 commit cdfac05

File tree

7 files changed

+22
-84
lines changed

7 files changed

+22
-84
lines changed

service/vspo-schedule/web/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"react-dom": "^18.3.1",
4444
"react-i18next": "^14.1.2",
4545
"react-tweet": "^3.2.1",
46-
"sass": "^1.77.6",
4746
"sharp": "^0.33.4",
4847
"swr": "^2.2.5",
4948
"typescript": "^5.5.2"

service/vspo-schedule/web/pnpm-lock.yaml

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/vspo-schedule/web/src/styles/Terms.module.scss renamed to service/vspo-schedule/web/src/components/Templates/AgreementDocument.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
.container {
1+
import { styled } from "@mui/material/styles";
2+
3+
export const AgreementDocument = styled("div")(`
24
h1 {
35
font-size: 2.5rem;
46
margin-top: 0;
@@ -35,4 +37,4 @@
3537
text-decoration: underline;
3638
}
3739
}
38-
}
40+
`);

service/vspo-schedule/web/src/components/Templates/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from "./AgreementDocument";
12
export * from "./ClipList";
23
export * from "./ClipTabs";
34
export * from "./Livestreams";

service/vspo-schedule/web/src/pages/privacy-policy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
2-
import styles from "@/styles/Terms.module.scss";
32
import { NextPageWithLayout } from "./_app";
43
import { ContentLayout } from "@/components/Layout/ContentLayout";
4+
import { AgreementDocument } from "@/components/Templates";
55
import { DEFAULT_LOCALE, QA_LINK } from "@/lib/Const";
66
import { GetStaticProps } from "next";
77
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
@@ -36,7 +36,7 @@ export const getStaticProps: GetStaticProps<Props> = async ({
3636

3737
const PrivacyPolicy: NextPageWithLayout<Props> = () => {
3838
return (
39-
<div className={styles.container}>
39+
<AgreementDocument>
4040
<h1>プライバシーポリシー</h1>
4141
<p>
4242
このプライバシーポリシーは,サービス提供者がこのウェブサイト上で提供するサービス(以下,「本サービス」といいます。)のプライバシーポリシー(以下,「本ポリシー」といいます。)を定めます。
@@ -123,7 +123,7 @@ const PrivacyPolicy: NextPageWithLayout<Props> = () => {
123123
</a>
124124
までお願いいたします。
125125
</p>
126-
</div>
126+
</AgreementDocument>
127127
);
128128
};
129129

service/vspo-schedule/web/src/pages/terms.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
2-
import styles from "@/styles/Terms.module.scss";
32
import { NextPageWithLayout } from "./_app";
43
import { ContentLayout } from "@/components/Layout/ContentLayout";
4+
import { AgreementDocument } from "@/components/Templates";
55
import { GetStaticProps } from "next";
66
import { DEFAULT_LOCALE } from "@/lib/Const";
77
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
@@ -36,7 +36,7 @@ export const getStaticProps: GetStaticProps<Props> = async ({
3636

3737
const Terms: NextPageWithLayout<Props> = () => {
3838
return (
39-
<div className={styles.container}>
39+
<AgreementDocument>
4040
<h1>利用規約</h1>
4141
<p>
4242
この利用規約(以下,「本規約」といいます。)は,サービス提供者がこのウェブサイト上で提供するサービス(以下,「本サービス」といいます。)の利用条件を定めます。
@@ -202,7 +202,7 @@ const Terms: NextPageWithLayout<Props> = () => {
202202
<p>
203203
本サービスに関して紛争が生じた場合には,サービス提供者の本店所在地を管轄する裁判所を専属的合意管轄とします。
204204
</p>
205-
</div>
205+
</AgreementDocument>
206206
);
207207
};
208208

service/vspo-schedule/web/src/styles/Home.module.scss

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)