Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed diff res construct error #787

Merged
merged 1 commit into from
Dec 28, 2024
Merged
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
3 changes: 2 additions & 1 deletion moon/src/app/(dashboard)/mr/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -71,7 +71,8 @@ export default function MRDetailPage({ params }: { params: Params }) {
const get_diff_content = useCallback(async () => {
const detail = await fetch(`/api/mr/${id}/files-changed`);
const res = await detail.json();
setOutputHtml(Diff2Html.html(res.data.data, { drawFileList: true, matching: 'lines' }));
const diff = Diff2Html.html(res.data.data.content, { drawFileList: true, matching: 'lines' })
setOutputHtml(diff);
}, [id])

useEffect(() => {

Unchanged files with check annotations Beta

/// Display trait for SHA1.
impl Display for SHA1 {
/// Allows [`SHA1::to_string()`] to be used.

Check warning on line 36 in mercury/src/hash.rs

GitHub Actions / Doc

unresolved link to `SHA1::to_string`
/// Note: If you want a terminal-friendly colorized output, use [`SHA1::to_color_str()`].
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", hex::encode(self.0))