Skip to content

Commit

Permalink
feat: 중첩라우팅 SSR 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
d0422 committed Jun 3, 2024
1 parent ff8a878 commit 525b798
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/miniNext/src/core/routeMapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const PAGES_PATH = 'dist/pages';
import { readdir } from 'fs';
import path from 'path';
import { Express, Request, Response } from 'express';
import { getServerSidePropsFunction } from './findServerSideProps';
import { getServerSidePropsFunction } from './getServerSidePropsFunction';
import { createHTML } from './createHTML';
import { getPagesFiles } from './getPagesFiles';

Expand Down
11 changes: 9 additions & 2 deletions apps/miniNext/src/pages/projects/1.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
export default function Project() {
return <div>Project</div>;
export const getServerSideProps = () => {
return {
props: {
string: `Hello Wolrd! I'm Project`,
},
};
};
export default function Project({ string }: { string: string }) {
return <div>{string}</div>;
}

0 comments on commit 525b798

Please sign in to comment.