Skip to content

Commit

Permalink
make add details button styles consistent with onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
ccatherinetan committed Dec 23, 2024
1 parent 69486f5 commit 76e9059
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 32 deletions.
37 changes: 17 additions & 20 deletions app/add-details/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import { insertUserPlants } from '@/api/supabase/queries/userPlants';
import { Button } from '@/components/Buttons';
import PlantDetails from '@/components/PlantDetails';
import CONFIG from '@/lib/configs';
import COLORS from '@/styles/colors';
Expand All @@ -15,7 +16,6 @@ import { useProfile } from '@/utils/ProfileProvider';
import {
ButtonDiv,
FooterButton,
MoveButton,
ReviewDetailsContainer,
ReviewGrid,
} from './styles';
Expand Down Expand Up @@ -150,24 +150,22 @@ export default function Home() {
<FooterButton>
<ButtonDiv>
{currentIndex > 1 && (
<MoveButton
type="button"
<Button
onClick={() => move(-1)}
$primaryColor="white"
$secondaryColor={COLORS.shrub}
$textColor={COLORS.shrub}
>
Back
</MoveButton>
</Button>
)}

<MoveButton
type="button"
disabled={disableNext}
<Button
onClick={() => move(1)}
$primaryColor={disableNext ? COLORS.midgray : COLORS.shrub}
$secondaryColor="white"
disabled={disableNext}
$primaryColor={COLORS.shrub}
>
Next
</MoveButton>
</Button>
</ButtonDiv>
</FooterButton>
</Flex>
Expand Down Expand Up @@ -200,22 +198,21 @@ export default function Home() {
))}
</ReviewDetailsContainer>
<Flex $direction="row" $justify="between" $maxW="500px" $mt="24px">
<MoveButton
type="button"
<Button
onClick={() => move(-1)}
$primaryColor="white"
$secondaryColor={COLORS.shrub}
$textColor={COLORS.shrub}
>
Back
</MoveButton>
<MoveButton
type="button"
disabled={!userId}
</Button>
<Button
onClick={handleSubmit}
$primaryColor={disableNext ? COLORS.midgray : COLORS.shrub}
$secondaryColor="white"
disabled={disableNext}
$primaryColor={COLORS.shrub}
>
Submit
</MoveButton>
</Button>
</Flex>
</Flex>
</Flex>
Expand Down
12 changes: 0 additions & 12 deletions app/add-details/styles.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
import styled from 'styled-components';
import { SmallRoundedButton } from '@/components/Button';
import COLORS from '@/styles/colors';

export const MoveButton = styled(SmallRoundedButton)`
border: 1px solid;
font-family: inherit;
margin-bottom: 10px;
width: 170px;
height: 50px;
font-size: 15px;
font-style: normal;
font-weight: 400;
line-height: normal;
`;
export const FooterButton = styled.div`
display: flex;
flex-direction: row;
Expand Down

0 comments on commit 76e9059

Please sign in to comment.