Skip to content

Commit

Permalink
example(hackernews): use flat route
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Nov 8, 2024
1 parent ed89a71 commit 3871721
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import ItemList from '../../components/item-list';
import { fetchList } from '../../services/api';
import type { Params } from '../../types';
import ItemList from '../components/item-list';
import { fetchList } from '../services/api';
import type { Params } from '../types';

export const Route = createFileRoute('/ask/$page')({
component: AskComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import ItemPage from '../../components/item-page';
import { fetchItem } from '../../services';
import ItemPage from '../components/item-page';
import { fetchItem } from '../services';

export const Route = createFileRoute('/item/$itemId')({
component: Item,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import ItemList from '../../components/item-list';
import { fetchList } from '../../services/api';
import type { Params } from '../../types';
import ItemList from '../components/item-list';
import { fetchList } from '../services/api';
import type { Params } from '../types';

export const Route = createFileRoute('/job/$page')({
component: JobComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import ItemList from '../../components/item-list';
import { fetchList } from '../../services/api';
import type { Params } from '../../types';
import ItemList from '../components/item-list';
import { fetchList } from '../services/api';
import type { Params } from '../types';

export const Route = createFileRoute('/new/$page')({
component: NewComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import ItemList from '../../components/item-list';
import { fetchList } from '../../services/api';
import type { Params } from '../../types';
import ItemList from '../components/item-list';
import { fetchList } from '../services/api';
import type { Params } from '../types';

export const Route = createFileRoute('/show/$page')({
component: ShowComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import ItemList from '../../components/item-list';
import { fetchList } from '../../services/api';
import type { Params } from '../../types';
import ItemList from '../components/item-list';
import { fetchList } from '../services/api';
import type { Params } from '../types';

export const Route = createFileRoute('/top/$page')({
component: TopComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { createFileRoute } from '@umijs/tnf/router';
import UserPage from '../../components/user-page';
import { fetchUser } from '../../services';
import UserPage from '../components/user-page';
import { fetchUser } from '../services';

export const Route = createFileRoute('/user/$userId')({
component: User,
Expand Down

0 comments on commit 3871721

Please sign in to comment.