diff --git a/css/index.scss b/css/index.scss
index 02528b1..14b2f9a 100644
--- a/css/index.scss
+++ b/css/index.scss
@@ -202,7 +202,7 @@ h3 {
div {
display: flex;
flex-direction: row;
- align-items: start;
+ align-items: center;
margin-left: 0.5em;
div {
flex-direction: column;
diff --git a/routes/user.tsx b/routes/user.tsx
index d086c5d..6bee7ed 100644
--- a/routes/user.tsx
+++ b/routes/user.tsx
@@ -1,6 +1,6 @@
import { h } from "../jsx.ts";
-import watt, { watt as originalWatt } from "../wattpad.ts";
-import { User } from "../wattpad.ts";
+import watt, { Story, watt as originalWatt } from "../wattpad.ts";
+import wattpad, { User } from "../wattpad.ts";
import { Context } from "../oak.ts";
import Base from "../templates/Base.tsx";
@@ -9,6 +9,7 @@ import FourOhFour from "./404.tsx";
export default async (params: URLSearchParams, ctx: Context) => {
const name = params.get("name");
+ const chapterNumber = Number(params.get("page")) ?? 0;
if (!name) {
throw "deez";
}
@@ -16,10 +17,26 @@ export default async (params: URLSearchParams, ctx: Context) => {
const user = new User(originalWatt.session, name);
try {
await user.init();
+ await user.updateStories(chapterNumber);
} catch {
return FourOhFour(undefined, ctx);
}
+ const res: Story[] = [];
+
+ for (let i = 0; i < user.stories.length; i++) {
+ const rizz = await watt.getStory(user.stories[i].id, false);
+ res.push(
+
+
+ {rizz.storyJSON.description}{rizz.name}
+
@@ -48,6 +81,53 @@ export default async (params: URLSearchParams, ctx: Context) => {
+ +