-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
88 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
5 changes: 5 additions & 0 deletions
5
apps/bible/app/bible/routing/intercepting-routes/@modal/(...)todo/[id]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const TodoModalPage = () => { | ||
<div>task by id page modal</div>; | ||
}; | ||
|
||
export default TodoModalPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const InterceptingRoutes = () => { | ||
return <div>hi</div>; | ||
}; | ||
|
||
export default InterceptingRoutes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { api } from "@/site/api"; | ||
import { Todo } from "../todo"; | ||
|
||
export type GetTodosResponse = { | ||
todos: Todo[]; | ||
}; | ||
|
||
export const getTodos = async ( | ||
init?: RequestInit, | ||
): Promise<GetTodosResponse> => { | ||
const resJSON = await fetch(`${api.route}/todos`, init); | ||
const data = (await resJSON.json()) as GetTodosResponse; | ||
return data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { FC } from "react"; | ||
import { Text } from "@/components/typography/text"; | ||
import type { Todo } from "../todo"; | ||
|
||
export const TodoCard: FC<Todo> = (todo) => { | ||
return ( | ||
<div className="p-md border rounded"> | ||
<Text>{todo.todo}</Text> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { getTodos } from "./api"; | ||
import { TodoCard } from "./components/todo-card"; | ||
|
||
type Todo = { | ||
id: number; | ||
todo: string; | ||
completed: boolean; | ||
userId: number; | ||
}; | ||
|
||
const api = { | ||
get_todos: getTodos, | ||
}; | ||
|
||
const components = { | ||
todoCard: TodoCard, | ||
}; | ||
|
||
export type { Todo }; | ||
export { api, components }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters