Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore #223

Merged
merged 1 commit into from
Sep 8, 2024
Merged

chore #223

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/BottomNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const Nav = styled.nav<{ height: number }>`
border-top: var(--border);
max-width: var(--max-width);
margin: 0 auto;
padding-top: 4px;
`;

const NavLink = styled(Link)<{ active: "true" | "false" } & LinkProps>`
Expand All @@ -136,7 +137,6 @@ const NavLink = styled(Link)<{ active: "true" | "false" } & LinkProps>`
justify-content: center;
align-items: center;

margin-top: 4px;
color: ${({ active }) => (active === "true" ? "var(--gray-800)" : "var(--gray-500)")};
`;

Expand Down
2 changes: 1 addition & 1 deletion components/atoms/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Input = forwardRef(function Input(
size={size}
border={size === "sm" ? "none" : undefined}
borderBottom={size === "sm" && "var(--border-main)"}
borderRadius={size === "sm" && "none"}
borderRadius={size === "sm" ? "none" : "4px"}
_focus={{
outline: size === "sm" ? "none" : undefined,
boxShadow: size === "sm" ? "none" : undefined,
Expand Down
22 changes: 11 additions & 11 deletions constants/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ActiveLocation,
InactiveLocation,
Location,
LocationEn
LocationEn,
} from "../types/services/locationTypes";
import { COLOR_TABLE } from "./colorConstants";

Expand Down Expand Up @@ -65,16 +65,16 @@ export const LOCATION_MEMBER_CNT: {
동대문: { member: 56, new: 2 },
마포: { member: 38, new: 2 },
인천: { member: 45, new: 3 },
성남: { member: 7, new: 3 },
성동: { member: 4, new: 1 },
고양: { member: 7, new: 3 },
중구: { member: 13, new: 2 },
송파: { member: 9, new: 4 },
구로: { member: 5, new: 1 },
동작: { member: 7, new: 4 },
강북: { member: 5, new: 3 },
부천: { member: 4, new: 2 },
시흥: { member: 7, new: 2 },
성남: { member: 17, new: 3 },
성동: { member: 8, new: 1 },
고양: { member: 11, new: 3 },
중구: { member: 17, new: 2 },
송파: { member: 14, new: 4 },
구로: { member: 11, new: 1 },
동작: { member: 13, new: 4 },
강북: { member: 11, new: 3 },
부천: { member: 10, new: 2 },
시흥: { member: 13, new: 2 },
};

export const krToEnMapping: Record<Location, LocationEn> = {
Expand Down
9 changes: 6 additions & 3 deletions pageTemplates/home/study/HomeStudyCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ function HomeStudyCol({ studyVoteData, isLoading }: HomeStudyColProps) {

const { mutate: decideStudyResult } = useStudyResultDecideMutation(date);

const preferenceStorage = JSON.parse(
localStorage.getItem(STUDY_PREFERENCE_LOCAL),
) as IStudyVotePlaces;
const preferenceLocal = localStorage.getItem(STUDY_PREFERENCE_LOCAL);

const preferenceStorage =
preferenceLocal && preferenceLocal !== "undefined"
? (JSON.parse(preferenceLocal) as IStudyVotePlaces)
: null;

useEffect(() => {
if (!studyVoteData || !studyVoteData.length || !session?.user || !studyDateStatus) {
Expand Down
4 changes: 2 additions & 2 deletions pages/register/comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ const Container = styled.div`
const Item = styled.div<{ $isSelected: boolean }>`
background-color: white;
width: 100%;
border-radius: var(--rounded-lg);
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
height: 48px;
margin-bottom: var(--gap-3);
color: ${(props) => (props.$isSelected ? "var(--gray-800)" : "var(--gray-500)")};
border: ${(props) => (props.$isSelected ? "var(--border-thick)" : "var(--border-main)")};
border: ${(props) => (props.$isSelected ? "var(--border-mint)" : "var(--border-main)")};
`;

export default Comment;
4 changes: 2 additions & 2 deletions pages/register/gender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const ButtonNav = styled.nav`

const Button = styled.button<{ $isSelected: boolean }>`
color: ${(props) => (props.$isSelected ? "var(--gray-800)" : "var(--gray-600)")};
border-radius: var(--rounded-lg);
border-radius: 4px;
flex: 0.49;
height: 48px;
font-size: 14px;
font-weight: ${(props) => props.$isSelected && "600"};
border: ${(props) => (props.$isSelected ? "var(--border-thick)" : "var(--border-main)")};
border: ${(props) => (props.$isSelected ? "var(--border-mint)" : "var(--border-main)")};
background-color: white;
`;

Expand Down
2 changes: 1 addition & 1 deletion pages/register/location.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Button = styled.button<{ $picked: string }>`
height: 72px;
position: relative;
border-radius: var(--rounded);
border: ${(props) => (props.$picked === "true" ? "var(--border-thick)" : "var(--border-main)")};
border: ${(props) => (props.$picked === "true" ? "var(--border-mint)" : "var(--border-main)")};
background-color: white;
`;

Expand Down
4 changes: 2 additions & 2 deletions pages/register/mbti.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ const ButtonNav = styled.nav`

const Button = styled.button<{ $isSelected: boolean }>`
color: ${(props) => (props.$isSelected ? "var(--gray-800)" : "var(--gray-500)")};
border-radius: var(--rounded-lg);
border-radius: 4px;
flex: 0.49;
height: 48px;
font-size: 14px;
font-weight: ${(props) => props.$isSelected && "600"};
border: ${(props) => (props.$isSelected ? "var(--border-thick)" : "var(--border-main)")};
border: ${(props) => (props.$isSelected ? "var(--border-mint)" : "var(--border-main)")};
background-color: white;
`;

Expand Down
12 changes: 6 additions & 6 deletions pages/register/name.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useSearchParams } from "next/navigation";
import { useSession } from "next-auth/react";
import { ChangeEvent, useRef, useState } from "react";
import { ChangeEvent, useEffect, useRef, useState } from "react";

import { Input } from "../../components/atoms/Input";
import BottomNav from "../../components/layouts/BottomNav";
Expand All @@ -21,11 +21,11 @@ function Name() {

const inputRef = useRef(null);

// useEffect(() => {
// if (inputRef.current) {
// inputRef.current.focus();
// }
// }, []);
useEffect(() => {
if (inputRef.current) {
inputRef.current.focus();
}
}, []);

const isProfileEdit = !!searchParams.get("edit");

Expand Down
2 changes: 1 addition & 1 deletion utils/mathUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ const deg2rad = (deg) => {
export const getBottomNavSize = () => {
const deviceType = detectDevice();
if (deviceType === "iPhone") {
return 87;
return 95;
} else return 77;
};
Loading