Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fdf8975
feat : install `cva` to implement shared `Button` component
yummjin Jun 28, 2025
541088e
feat : implement `Button` component
yummjin Jun 28, 2025
bfbf97c
feat : add image asset of phone call complete page
yummjin Jun 28, 2025
11e98e9
feat : implement `PhoneCompleteScreen`
yummjin Jun 28, 2025
356088c
feat : add conditional line to render `Dock` component
yummjin Jun 28, 2025
8964bb3
refactor : make all buttons use `Button` component
yummjin Jun 28, 2025
9c0c9a4
feat : implement appbar with iconbutton at `HomeScreen`
yummjin Jun 28, 2025
ca20187
feat : add `PhotoUploadScreen`
yummjin Jun 28, 2025
7221c5b
refactor : change layer and add mode of image hook to reuse
yummjin Jun 28, 2025
d62b6c3
feat : implement `PhotoUploadContainer`
yummjin Jun 28, 2025
0d29602
refactor : change import of hook
yummjin Jun 28, 2025
ae4d7cb
feat : add style of disabled intent
yummjin Jun 28, 2025
5f5422f
feat : add normal appbar
yummjin Jun 28, 2025
dbfc9d9
feat : add render conditional logic
yummjin Jun 28, 2025
81bcfde
design : change text
yummjin Jun 28, 2025
f1554fd
design : adjust button size and text
yummjin Jun 28, 2025
97c028a
design : add letter spacing
yummjin Jun 28, 2025
e598bd5
feat : add search icon
yummjin Jun 28, 2025
6647ff8
feat : implement `FormScreen`
yummjin Jun 28, 2025
c23afe2
feat : change style of normal appbar and add conditional to dock
yummjin Jun 28, 2025
22bc782
feat : define the type of `Reservation`
yummjin Jun 28, 2025
8f045cf
feat : add path of `FormScreen`
yummjin Jun 28, 2025
9256a7f
rename : change `PhoneCompleteScreen` into `CompleteScreen`
yummjin Jun 28, 2025
6db81d1
feat : define `User` type
yummjin Jun 28, 2025
c52004f
feat : implement shared util function session
yummjin Jun 28, 2025
4563323
feat : store user information on success
yummjin Jun 28, 2025
84d1b36
feat : add favicon
yummjin Jun 28, 2025
722a4ba
chore : install framer to implement animation
yummjin Jun 28, 2025
d4bca84
feat : add loading animation component with multiple loader images
yummjin Jun 28, 2025
b323a50
feat : add PhotoLoadingScreen and update stackflow configuration
yummjin Jun 28, 2025
992dd12
feat : add icons for `ToolButton`
yummjin Jun 28, 2025
3ca120e
fix : change baseurl
yummjin Jun 28, 2025
2a64dec
feat : add endpoint and get recommended tools from server
yummjin Jun 28, 2025
8e4d878
feat : add `Tool` type definition and export in types
yummjin Jun 28, 2025
5899211
feat : add `isPending` status at `useImageUpload` to get status
yummjin Jun 28, 2025
0b52edd
feat : implement `PhotoResultScreen`
yummjin Jun 28, 2025
34eabb4
feat : implement `PhotoResultContainer` and `ToolButton` show tools
yummjin Jun 28, 2025
10297bd
feat : add `bgImage` option at `NormalAppBar` and edit rendering opti…
yummjin Jun 28, 2025
aad309e
feat : add `base64ToFile` utility function to convert base64 strings …
yummjin Jun 28, 2025
2a02301
feat : add text indicating fetching status
yummjin Jun 28, 2025
e29a713
feat : add screen at stack and complete photo functionality
yummjin Jun 28, 2025
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
Binary file added favicon/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>농기구온</title>
</head>
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
"@tailwindcss/vite": "^4.1.11",
"@tanstack/react-query": "^5.81.5",
"axios": "^1.10.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"daisyui": "^5.0.43",
"framer-motion": "^12.19.2",
"prettier": "^3.6.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
Expand Down
53 changes: 53 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Stack } from "./stackflow";
import { Stack } from './stackflow';

export default function App() {
return (
<div className="size-screen">
<div className="scrollbar-hide container-mobile fixed inset-0 overflow-hidden">
<div className="scrollbar-hide container-mobile fixed inset-0 overflow-hidden tracking-wide">
<Stack />
</div>
</div>
Expand Down
16 changes: 15 additions & 1 deletion src/app/stackflow/Stack.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { CompleteScreen } from '@/screen/complete';
import { FormScreen } from '@/screen/form/ui';
import { HomeScreen } from '@/screen/home/ui';
import { JoinScreen } from '@/screen/join/ui';
import { PhotoLoadingScreen } from '@/screen/photo-loading/ui';
import { PhotoResultScreen } from '@/screen/photo-result/ui';
import { PhotoUploadScreen } from '@/screen/photo-upload/ui';
import { fetchSessionData } from '@/shared/utils';
import { basicUIPlugin } from '@stackflow/plugin-basic-ui';
import { basicRendererPlugin } from '@stackflow/plugin-renderer-basic';
import { stackflow } from '@stackflow/react';
Expand All @@ -9,12 +15,20 @@ export const { Stack, useFlow } = stackflow({
activities: {
JoinScreen,
HomeScreen,
PhotoUploadScreen,
FormScreen,
CompleteScreen,
PhotoLoadingScreen,
PhotoResultScreen,
},
plugins: [
basicRendererPlugin(),
basicUIPlugin({
theme: 'cupertino',
}),
],
initialActivity: () => 'HomeScreen',
initialActivity: () => {
if (fetchSessionData('userInfo')) return 'HomeScreen';
return 'JoinScreen';
},
});
4 changes: 4 additions & 0 deletions src/assets/icons/icon-bell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/icon-checked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/icon-help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/icon-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/icon-unchecked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import ReservationIcon from './icon-reservation.svg';
import HomeSelectedIcon from './icon-home-selected.svg';
import UserSelectedIcon from './icon-user-selected.svg';
import ReservationSelectedIcon from './icon-reservation-selected.svg';
import BellIcon from './icon-bell.svg';
import HelpIcon from './icon-help.svg';
import SearchIcon from './icon-search.svg';
import CheckIcon from './icon-checked.svg';
import UnCheckedIcon from './icon-unchecked.svg';

export {
Logo,
Expand All @@ -24,4 +29,9 @@ export {
HomeSelectedIcon,
UserSelectedIcon,
ReservationSelectedIcon,
BellIcon,
HelpIcon,
SearchIcon,
CheckIcon,
UnCheckedIcon,
};
Binary file added src/assets/images/background-loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/call-complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions src/assets/images/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
import BackgroundImage from "./background.png";
import BackgroundImage from './background.png';
import LoadingBackground from './background-loading.png';
import PhoneCompleteImage from './call-complete.png';
import Loader1 from './loader-1.png';
import Loader2 from './loader-2.png';
import Loader3 from './loader-3.png';
import Loader4 from './loader-4.png';

export { BackgroundImage };
export {
BackgroundImage,
LoadingBackground,
Loader1,
Loader2,
Loader3,
Loader4,
PhoneCompleteImage,
};
Binary file added src/assets/images/loader-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/loader-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/loader-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/loader-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions src/screen/complete/CompleteScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { AppScreen } from '@stackflow/plugin-basic-ui';
import { Dock } from '@/shared/ui';
import { PhoneCompleteImage } from '@/assets/images';
import Button from '@/shared/ui/Button';
import { useFlow } from '@/app/stackflow';

export default function PhoneCompleteScreen() {
const { pop } = useFlow();

return (
<>
<AppScreen>
<div className="grid size-full place-items-center">
<div className="flex flex-col items-center">
<img src={PhoneCompleteImage} className="mb-8 size-50" />
<p className="mb-3 text-2xl font-medium">신청이 완료되었습니다</p>
<p className="mb-[135px] text-center leading-[30px]">
AI가 계약서를 자동으로 작성하였으며 <br />
<b>예약 현황</b>에서 언제든지 확인하실 수 있습니다
</p>
<Button size="lg" className="w-[310px]" onClick={() => pop()}>
홈으로 돌아가기
</Button>
</div>
</div>
</AppScreen>
<Dock />
</>
);
}
1 change: 1 addition & 0 deletions src/screen/complete/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as CompleteScreen } from './CompleteScreen';
17 changes: 17 additions & 0 deletions src/screen/form/ui/FormScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { NormalAppBar } from '@/shared/ui';
import { FormContainer } from '@/widgets/form/ui';
import { AppScreen } from '@stackflow/plugin-basic-ui';

export default function PhotoUploadScreen() {
return (
<AppScreen
appBar={{
backgroundColor: '#fff',
...NormalAppBar('직접 입력해서 신청하기'),
}}
backgroundColor="#F9F9F9"
>
<FormContainer />
</AppScreen>
);
}
1 change: 1 addition & 0 deletions src/screen/form/ui/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as FormScreen } from './FormScreen';
4 changes: 2 additions & 2 deletions src/screen/home/ui/HomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AppScreen } from '@stackflow/plugin-basic-ui';
import { BackgroundImage } from '@/assets/images';
import { BasicAppBar, Dock } from '@/shared/ui';
import { HomeAppBar, Dock } from '@/shared/ui';
import { HomeContainer } from '@/widgets/home/ui';

export default function HomeScreen() {
Expand All @@ -9,7 +9,7 @@ export default function HomeScreen() {
<AppScreen
preventSwipeBack
backgroundImage={`url(${BackgroundImage})`}
appBar={BasicAppBar}
appBar={HomeAppBar()}
>
<HomeContainer />
</AppScreen>
Expand Down
34 changes: 34 additions & 0 deletions src/screen/photo-loading/ui/PhotoLoadingScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { LoadingBackground } from '@/assets/images';
import { Loader } from '@/shared/ui';
import { useSubmitPhoto } from '@/widgets/photo-upload/api';
import { AppScreen } from '@stackflow/plugin-basic-ui';
import type { ActivityComponentType } from '@stackflow/react';
import { useEffect } from 'react';

const PhotoLoadingScreen: ActivityComponentType<{ data: FormData }> = ({
params,
}: {
params: { data: FormData };
}) => {
const { mutate: submitPhoto } = useSubmitPhoto();

useEffect(() => {
submitPhoto(params.data);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

return (
<AppScreen backgroundImage={`url(${LoadingBackground})`}>
<div className="grid h-screen w-full place-items-center">
<div className="flex flex-col items-center">
<Loader />
<p className="text-s -mt-4 text-center text-xl font-semibold">
AI가 사진을 분석하고 있어요...
</p>
</div>
</div>
</AppScreen>
);
};

export default PhotoLoadingScreen;
1 change: 1 addition & 0 deletions src/screen/photo-loading/ui/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as PhotoLoadingScreen } from './PhotoLoadingScreen';
19 changes: 19 additions & 0 deletions src/screen/photo-result/ui/PhotoResultScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Tool } from '@/shared/types';
import { NormalAppBar } from '@/shared/ui';
import { AppScreen } from '@stackflow/plugin-basic-ui';
import type { ActivityComponentType } from '@stackflow/react';
import { PhotoResultContainer } from '@/widgets/photo-result/ui';

const PhotoLoadingScreen: ActivityComponentType<{ result: Tool[] }> = ({
params,
}: {
params: { result: Tool[] };
}) => {
return (
<AppScreen appBar={NormalAppBar('')}>
<PhotoResultContainer tools={params.result} />
</AppScreen>
);
};

export default PhotoLoadingScreen;
1 change: 1 addition & 0 deletions src/screen/photo-result/ui/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as PhotoResultScreen } from './PhotoResultScreen';
11 changes: 11 additions & 0 deletions src/screen/photo-upload/ui/PhotoUploadScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { NormalAppBar } from '@/shared/ui';
import { PhotoUploadContainer } from '@/widgets/photo-upload/ui';
import { AppScreen } from '@stackflow/plugin-basic-ui';

export default function PhotoUploadScreen() {
return (
<AppScreen appBar={NormalAppBar('')}>
<PhotoUploadContainer />
</AppScreen>
);
}
1 change: 1 addition & 0 deletions src/screen/photo-upload/ui/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as PhotoUploadScreen } from './PhotoUploadScreen';
Loading