Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/modules/Blog/Blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Blog: React.FC<BlogProps> = ({ className, feed }) => {
</time>
<a
className="ml-xs"
href={e.link[0].href}
href={e.link.href}
target="_blank"
rel="noreferrer noopener"
>
Expand Down
22 changes: 3 additions & 19 deletions src/domain/blog/model.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,11 @@ import type { Entry, Feed } from "./model";
export const getEntryFixture = (entry?: Partial<Entry>): Entry => {
return {
title: "Entry title",
link: [
{
href: "https://example.com/",
},
],
link: {
href: "https://example.com/",
},
id: "Entry id",
published: "2022-09-10T00:00:00+09:00",
updated: "2022-09-10T00:00:00+09:00",
summary: "Entry summary",
content: "Entry content",
category: {
term: "Category term",
label: "Category label",
},
author: {
name: "Author name",
},
...entry,
};
};
Expand All @@ -32,10 +20,6 @@ export const getFeedFixture = (feed?: Partial<Feed>): Feed => {
href: "https://example.com/",
},
updated: "2022-09-10T00:00:0+09:00",
author: {
name: "Author name",
},
id: "Blog id",
entry: [getEntryFixture()],
...feed,
};
Expand Down
22 changes: 2 additions & 20 deletions src/domain/blog/model.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
export interface Entry {
title: string;
link: {
href: string;
}[];
link: { href: string };
id: string;
published: string;
updated: string;
summary: string;
content: string;
category: {
term: string;
label: string;
};
author: {
name: string;
};
}

export interface Feed {
title: string;
subTitle: string;
link: {
href: string;
};
link: { href: string };
updated: string;
author: {
name: string;
};
id: string;
entry: Entry[];
}