Skip to content
Snippets Groups Projects
Commit 354a3f81 authored by Štěpán Šonovský's avatar Štěpán Šonovský
Browse files

fix: better design

parent ca686821
No related branches found
No related tags found
No related merge requests found
......@@ -62,11 +62,14 @@ const App: React.FC = () => {
</div>
{(projectId) ? (
<>
<CommitList projectId={projectId} token={token} host={domain} onCommitClick={handleCommitClick} />
{selectedCommit && (
<CommitDetail projectId={projectId} commitId={selectedCommit} token={token} />
)}
<div className="flex p">
<CommitList projectId={projectId} token={token} host={domain} onCommitClick={handleCommitClick} />
{selectedCommit && (
<CommitDetail projectId={projectId} commitId={selectedCommit} token={token} />
)}
</div>
</>
) : null}
</div>
);
......
......@@ -15,7 +15,7 @@ const CommitDetail: React.FC<CommitDetailProps> = ({ projectId, commitId, token
if (error) return <p>Error: {error.message}</p>;
return (commit) && (
<div className="bg-white shadow-md rounded-lg p-4">
<div className="bg-white shadow-md rounded-lg p-4 ml-4">
<p className="mb-2"><strong>ID:</strong> {commit.id}</p>
<p className="mb-2"><strong>Short ID:</strong> {commit.short_id}</p>
<p className="mb-2"><strong>Created At:</strong> {new Date(commit.created_at).toLocaleString()}</p>
......
......@@ -23,8 +23,6 @@ const CommitList: React.FC<CommitListProps> = ({ projectId, token, host, onCommi
return (
<div className="bg-white shadow-md rounded-lg p-4">
<p>{host}</p>
{commits ? (
<ul className="bg-white shadow-md rounded-lg p-4">
{commits.map(commit => (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment