11'use client'
2- import { useState } from 'react'
2+ import { useState , useMemo } from 'react'
33import Dialog from '@mui/material/Dialog'
44import DialogContent from '@mui/material/DialogContent'
55import DialogTitle from '@mui/material/DialogTitle'
@@ -40,43 +40,41 @@ const dialogContentSx = {
4040 } ,
4141}
4242
43- const dialogContentBoxSx = {
44- '& h2' : {
45- fontSize : { xs : '1.0625rem' , sm : '1.125rem' } ,
46- fontWeight : 600 ,
47- mt : { xs : 2.5 , sm : 3 } ,
48- mb : { xs : 1.5 , sm : 2 } ,
49- color : 'text.primary' ,
50- } ,
51- '& p' : {
52- fontSize : { xs : '0.875rem' , sm : '0.9rem' } ,
53- lineHeight : { xs : 1.6 , sm : 1.7 } ,
54- letterSpacing : '0.005em' ,
55- color : 'text.secondary' ,
56- textAlign : { xs : 'left' , sm : 'justify' } ,
57- hyphens : 'auto' ,
58- } ,
59- '& ul' : {
60- pl : { xs : 2.5 , sm : 3 } ,
61- '& li' : {
43+ export function Privacy ( { open, onClose } : PrivacyProps ) {
44+ const theme = useTheme ( )
45+
46+ const dialogContentBoxSx = useMemo ( ( ) => ( {
47+ '& h2' : {
48+ fontSize : { xs : '1.0625rem' , sm : '1.125rem' } ,
49+ fontWeight : 600 ,
50+ color : 'text.primary' ,
51+ } ,
52+ '& p' : {
6253 fontSize : { xs : '0.875rem' , sm : '0.9rem' } ,
63- lineHeight : { xs : 1.5 , sm : 1.6 } ,
54+ lineHeight : { xs : 1.6 , sm : 1.7 } ,
6455 letterSpacing : '0.005em' ,
6556 color : 'text.secondary' ,
66- mb : { xs : 0.75 , sm : 1 } ,
57+ textAlign : { xs : 'left' , sm : 'justify' } ,
58+ hyphens : 'auto' ,
6759 } ,
68- } ,
69- '& a' : {
70- color : 'text.primary' ,
71- textDecorationColor : 'rgba(0,0,0,0.25)' ,
72- textUnderlineOffset : 3 ,
73- fontWeight : 450 ,
74- '&:hover' : { textDecorationColor : 'text.primary' } ,
75- } ,
76- }
77-
78- export function Privacy ( { open, onClose } : PrivacyProps ) {
79- const theme = useTheme ( )
60+ '& ul' : {
61+ pl : { xs : 2.5 , sm : 3 } ,
62+ '& li' : {
63+ fontSize : { xs : '0.875rem' , sm : '0.9rem' } ,
64+ lineHeight : { xs : 1.5 , sm : 1.6 } ,
65+ letterSpacing : '0.005em' ,
66+ color : 'text.secondary' ,
67+ mb : { xs : 0.75 , sm : 1 } ,
68+ } ,
69+ } ,
70+ '& a' : {
71+ color : 'text.primary' ,
72+ textDecorationColor : 'rgba(0,0,0,0.25)' ,
73+ textUnderlineOffset : 3 ,
74+ fontWeight : 450 ,
75+ '&:hover' : { textDecorationColor : theme . palette . text . primary } ,
76+ } ,
77+ } ) , [ theme ] )
8078
8179 return (
8280 < Dialog
@@ -85,7 +83,6 @@ export function Privacy({ open, onClose }: PrivacyProps) {
8583 maxWidth = "md"
8684 fullWidth
8785 scroll = "paper"
88- disableScrollLock
8986 transitionDuration = { { enter : 300 , exit : 200 } }
9087 sx = { {
9188 '& .MuiDialog-paper' : {
0 commit comments