Skip to content

Commit 7bd88de

Browse files
committed
Feature: Add records section link to fixed menu
1 parent c179038 commit 7bd88de

File tree

6 files changed

+37
-7
lines changed

6 files changed

+37
-7
lines changed

components/FlexableNav/FlexableNav.styled.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export const ContentContainer = styled.div`
165165
font-weight: 600;
166166
167167
opacity: 0;
168+
transform: translate3d(0, 30px, 0);
168169
animation: ${getContentFadeKeyframe("30px")} 0.4s cubic-bezier(0.2, 0, 0, 1)
169170
forwards 0.35s;
170171
}
@@ -176,6 +177,7 @@ export const ContentContainer = styled.div`
176177
color: #d2d2d2;
177178
178179
opacity: 0;
180+
transform: translate3d(0, 16px, 0);
179181
animation: ${getContentFadeKeyframe("16px")} 0.4s cubic-bezier(0.2, 0, 0, 1)
180182
forwards 0.45s;
181183
}

components/Menu/FixedMenu/FixedMenu.styled.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ const FadeContentKeyframe = keyframes`
164164
opacity: 1;
165165
}
166166
`;
167+
167168
export const FadeContentAnimationCSS = css`
168169
animation: ${FadeContentKeyframe} 0.5s cubic-bezier(0.2, 0, 0, 1) forwards;
169170
`;
171+
172+
export const SectionLinkItemContainer = styled(SectionItemContainer)``;

components/Menu/FixedMenu/FixedMenu.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
MdAllInbox,
23
MdDesktopWindows,
34
MdKeyboardArrowLeft,
45
MdNotifications,
@@ -23,6 +24,7 @@ import {
2324
Container,
2425
MainMenuBar,
2526
SectionItemContainer,
27+
SectionLinkItemContainer,
2628
SliderContainer,
2729
} from "./FixedMenu.styled";
2830
import {
@@ -39,6 +41,7 @@ import TimeSectionContent from "./contents/Time";
3941
import { useQuery } from "@tanstack/react-query";
4042
import { getOptionFromDB, OPTION_DB_KEY } from "../../../hooks/useIDB";
4143
import { useOptionSetEffect } from "../menu.util";
44+
import Link from "next/link";
4245

4346
function Slider({ children, onClose }: ISliderProps) {
4447
const sliderRef = useRef<HTMLDivElement>(null);
@@ -47,9 +50,6 @@ function Slider({ children, onClose }: ISliderProps) {
4750
const [isSliderActive, setIsSliderActive] = useRecoilState(ISA);
4851
const [isHideTimer] = useMediaMatch(Theme.mediaQueries.hideTimerMaxWidth);
4952

50-
const { data: optionData } = useQuery([OPTION_DB_KEY], getOptionFromDB);
51-
useOptionSetEffect;
52-
5353
const closeSlider = () => {
5454
setIsSliderActive(false);
5555
};
@@ -126,6 +126,20 @@ function SectionItem({
126126
);
127127
}
128128

129+
function SectionLinkItem({ icon, text, href }: IOpenLinkItemProps) {
130+
return (
131+
<Link
132+
href={href}
133+
style={{ textDecoration: "none", WebkitTapHighlightColor: "transparent" }}
134+
>
135+
<SectionLinkItemContainer active={false}>
136+
<div className="icon-wrapper">{icon}</div>
137+
<span className="item-text">{text}</span>
138+
</SectionLinkItemContainer>
139+
</Link>
140+
);
141+
}
142+
129143
function OpenLinkItem({ icon, text, href }: IOpenLinkItemProps) {
130144
return (
131145
<SectionItemContainer active={false}>
@@ -163,6 +177,14 @@ export default function FixedMenu() {
163177
</Slider>
164178
<MainMenuBar>
165179
<div className="section">
180+
<SectionLinkItem
181+
href="/records"
182+
icon={<MdAllInbox />}
183+
text="Records"
184+
/>
185+
186+
<div style={{ height: "24px" }}></div>
187+
166188
<SectionItem
167189
defaultIcon={<IoMdTime />}
168190
text={language === "kor" ? "시간" : "Time"}
@@ -189,6 +211,8 @@ export default function FixedMenu() {
189211
selected={section === "notification"}
190212
onClick={() => setSection("notification")}
191213
></SectionItem>
214+
215+
<div style={{ height: "24px" }}></div>
192216
</div>
193217
<div className="section">
194218
<OpenLinkItem

components/Record/RecordLogs/RecordLogs.styled.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const NoLogContainer = styled.div`
4040
color: #626262;
4141
4242
opacity: 0;
43-
transform: translate3d(0, calc(-14px * 4), 0);
43+
transform: translate3d(0, calc(-14px * 4 + 30px), 0);
4444
animation: ${NoLogContainerFadeKeyframe} 0.4s cubic-bezier(0.2, 0, 0, 1) 0.65s
4545
forwards;
4646
@@ -84,6 +84,7 @@ export const CardBox = styled.div<{ borderColor: string }>`
8484
gap: 48px;
8585
8686
opacity: 0;
87+
transform: translate3d(0, 30px, 0);
8788
animation: ${CardContainerFadeKeyframe} 0.4s cubic-bezier(0.2, 0, 0, 1) 0.65s
8889
forwards;
8990

next.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ const nextConfig = {
1111
basePath: isDevServer ? "/absproxy/3000" : "",
1212
};
1313

14-
module.exports = withPWA(nextConfig);
15-
// module.exports = nextConfig;
14+
// module.exports = withPWA(nextConfig);
15+
module.exports = nextConfig;

public/sw.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)