Skip to content

Commit bff5707

Browse files
committed
Fix #29 and #26
1 parent e7dd0be commit bff5707

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Website/src/activitys/DAPITestActivity.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import { Page } from "@Components/onsenui/Page";
2727
import { os } from "@Native/Os";
2828
import { useActivity } from "@Hooks/useActivity";
2929
import { useStrings } from "@Hooks/useStrings";
30-
import DescriptonActivity from "./DescriptonActivity";
3130
import { Markup } from "@Components/Markdown";
31+
import FetchTextActivity from "./FetchTextActivity";
3232

3333
interface CustomCommand extends Command {
3434
icon: React.ElementType;
@@ -140,11 +140,11 @@ const DAPITestActivity = () => {
140140

141141
const handlePreview = () => {
142142
context.pushPage({
143-
component: DescriptonActivity,
143+
component: FetchTextActivity,
144144
key: "dapi-preview",
145145
extra: {
146146
title: "Preview",
147-
desc: description,
147+
data: description,
148148
},
149149
});
150150
};

Website/src/activitys/FetchTextActivity.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { MissingInternet } from "@Components/MissingInternet";
1212

1313
type FetchTextActivityExtra = {
1414
title: string;
15+
data: string;
1516
url: string;
1617
};
1718

@@ -30,7 +31,7 @@ function FetchTextActivity() {
3031

3132
const initialState: State<string> = {
3233
error: undefined,
33-
data: undefined,
34+
data: extra.data || undefined,
3435
};
3536

3637
// Keep state logic separated

0 commit comments

Comments
 (0)